rusackas commented on code in PR #36548:
URL: https://github.com/apache/superset/pull/36548#discussion_r2629768804
##########
superset/security/manager.py:
##########
@@ -389,6 +389,61 @@ class SupersetSecurityManager( # pylint:
disable=too-many-public-methods
("can_read", "Database"),
}
+ # Permissions for the Public role - minimal read-only access for viewing
+ # dashboards without authentication. This is more restrictive than Gamma.
+ # Users can set PUBLIC_ROLE_LIKE = "Public" to use these sensible defaults.
+ PUBLIC_ROLE_PERMISSIONS = {
+ # Core dashboard viewing
+ ("can_read", "Dashboard"),
+ ("can_read", "Chart"),
+ ("can_dashboard", "Superset"),
+ ("can_slice", "Superset"),
+ ("can_explore_json", "Superset"),
+ ("can_dashboard_permalink", "Superset"),
+ ("can_read", "DashboardPermalinkRestApi"),
+ # Dashboard filter interactions
+ ("can_read", "DashboardFilterStateRestApi"),
+ ("can_write", "DashboardFilterStateRestApi"),
+ # API access for chart rendering
+ ("can_time_range", "Api"),
+ ("can_query_form_data", "Api"),
+ ("can_query", "Api"),
+ # CSS for dashboard styling
+ ("can_read", "CssTemplate"),
+ # Embedded dashboard support
+ ("can_read", "EmbeddedDashboard"),
+ # Datasource metadata for chart rendering
+ ("can_get", "Datasource"),
+ ("can_external_metadata", "Datasource"),
+ ("can_external_metadata_by_name", "Datasource"),
+ # Security API for CSRF tokens
+ ("can_read", "SecurityRestApi"),
+ # Menu and OpenAPI access
+ ("can_get", "OpenApi"),
+ ("can_get", "MenuApi"),
+ }
+
Review Comment:
Thanks for catching that... I'll take 'em out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]