mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
feat(security): add built-in Public role for anonymous dashboard access (#36548)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,7 @@ def sanitize_datasource_data(
|
||||
def bootstrap_user_data(user: User, include_perms: bool = False) -> dict[str, Any]:
|
||||
if user.is_anonymous:
|
||||
payload = {}
|
||||
user.roles = (security_manager.find_role("Public"),)
|
||||
user.roles = (security_manager.get_public_role(),)
|
||||
elif security_manager.is_guest_user(user):
|
||||
payload = {
|
||||
"username": user.username,
|
||||
|
||||
Reference in New Issue
Block a user