bmaquet commented on code in PR #32770:
URL: https://github.com/apache/superset/pull/32770#discussion_r2005908958


##########
superset/utils/core.py:
##########
@@ -1292,6 +1292,19 @@ def get_user_email() -> str | None:
         return None
 
 
+def get_user_roles() -> list[str] | None:

Review Comment:
   I agree we don't necessarily need it in the context of this PR and we could 
use `[role.name for role in g.user.roles]` in `superset/jinja_context.py`.
   
   I simply added it here to stay consistent with other macros, like 
`current_user_email()`, where `get_user_email()` is also defined in `core.py`, 
but only imported and used in `jinja_context.py`.
   
   Happy to remove if we believe it's best to not have this function defined in 
`core.py`



-- 
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]

Reply via email to