Vitor-Avila commented on code in PR #34319:
URL: https://github.com/apache/superset/pull/34319#discussion_r2248256882


##########
tests/integration_tests/base_tests.py:
##########
@@ -180,33 +181,39 @@ def temporary_user(
         temp_user = ab_models.User(
             username=username, email=f"{username}@temp.com", active=True
         )
+        pvms = []
+
         if clone_user:
-            temp_user.roles = clone_user.roles
             temp_user.first_name = clone_user.first_name
             temp_user.last_name = clone_user.last_name
             temp_user.password = clone_user.password
+            if clone_user.roles:
+                for role in clone_user.roles:
+                    pvms.extend(role.permissions)

Review Comment:
   Moving away from doing `temp_user.roles = clone_user.roles` because now we 
support `pvms_to_remove` and we don't want to remove pvms from the copied role.



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