Skip to content

Commit

Permalink
added debug for roles
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Mar 18, 2024
1 parent 06a1580 commit 4cd36a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion keycloak_security_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#
import logging
#
from flask_appbuilder.security.manager import AUTH_OID
from superset.security import SupersetSecurityManager
from flask_oidc import OpenIDConnect
Expand All @@ -9,6 +12,8 @@
#
AUTH_ROLES_SYNC_AT_LOGIN = True
#
logger = logging.getLogger(__name__)
#
class OIDCSecurityManager(SupersetSecurityManager):
#
def __init__(self, appbuilder):
Expand All @@ -34,7 +39,7 @@ def handle_login():
roles = info.get('roles', [])
roles += [default_role, ]
sub = info.get("sub")
print("roles", roles)
logger.debug("roles", roles)
#user = sm.add_user(info.get('preferred_username'), info.get('given_name', ''), info.get('family_name', ''),
# info.get('email'), [sm.find_role(role) for role in roles])
user = sm.add_user(
Expand Down

0 comments on commit 4cd36a3

Please sign in to comment.