ktmud commented on a change in pull request #12680:
URL: https://github.com/apache/superset/pull/12680#discussion_r567196656
##########
File path: tests/base_tests.py
##########
@@ -149,7 +150,11 @@ def create_user_with_roles(username: str, roles:
List[str]):
db.session.commit()
user_to_create = security_manager.find_user(username)
assert user_to_create
- user_to_create.roles = [security_manager.find_role(r) for r in roles]
+ user_to_create.roles = []
+ for chosen_user_role in roles:
+ if copy_roles:
+ security_manager.copy_role("Gamma", chosen_user_role, False)
Review comment:
I think in a real use case, the roles users created will also not need
to copy over all gamma permission. It will just contain some metadata about
what user group this role represents (currently only configurable via role
name). Copying permissions between roles should be avoided if possible since
users can already have multiple roles.
@dpgaspar what do you think?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]