mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
feat: security, user group support (#32121)
This commit is contained in:
committed by
GitHub
parent
fe33661821
commit
15cf06699a
@@ -103,8 +103,8 @@ def bootstrap_user_data(user: User, include_perms: bool = False) -> dict[str, An
|
||||
def get_permissions(
|
||||
user: User,
|
||||
) -> tuple[dict[str, list[tuple[str]]], DefaultDict[str, list[str]]]:
|
||||
if not user.roles:
|
||||
raise AttributeError("User object does not have roles")
|
||||
if not user.roles and not user.groups:
|
||||
raise AttributeError("User object does not have roles or groups")
|
||||
|
||||
data_permissions = defaultdict(set)
|
||||
roles_permissions = security_manager.get_user_roles_permissions(user)
|
||||
|
||||
Reference in New Issue
Block a user