workflows: use hidden attribute to alter user after role change using (#39350)

This commit is contained in:
Frédéric Péters 2020-01-28 17:00:02 +01:00
parent 7bcdac0413
commit 674ca5b687
1 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class AddRoleWorkflowStatusItem(WorkflowStatusItem):
if request and request.user and request.user.id == user.id:
# if we changed the currently logged in user, we update it with the
# changes.
request.user = user
request._user = user
def perform_idp(self, user, formdata, role_id):
role = Role.get(role_id)
@ -164,7 +164,7 @@ class RemoveRoleWorkflowStatusItem(WorkflowStatusItem):
if request and request.user and request.user.id == user.id:
# if we changed the currently logged in user, we update it
# with the changes.
request.user = user
request._user = user
def perform_idp(self, user, formdata, role_id):
role = Role.get(role_id)