Revoke user role from the current user session
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2025 11:30 AM - edited 06-03-2025 11:34 AM
Hi Everyone,
I have one requirement once user has completed to run the atf test case then 'impersonator' role should be revoked from the user's current session.
Providing the impersonator role in current session is working fine but I'm not able to revoke 'impersonator' role from user current session.
If anyone has implemented the similar functionality then please let me know.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2025 06:29 AM
You can add server test step to update the user record by remove the impersonate role for above user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2025 06:57 AM
Hi @Neha42
As a best practice, a new user account should be created within the ATF tests, and the impersonator role should be granted through a test step.
This ensures that all activities performed during the test run are reverted without any negative impact.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 11:20 AM
Hi @J Siva
Thanks for the reply.
Here, the requirement is: The Actual user, who is running the test case should not have impersonator role so we have removed Impersonator role from ATF Test Designer Role( contains Impersonator role).
In test step, impersonate will work only when actual user will have impersonator role.
While at starting to run the test case, we are granting the impersonator role to the Actual user in current session but after successful run of the test cases, I need to revoke Impersonator role from the actual user.
Revoking impersonator role from actual user in current session is not working and we cannot grant impersonator role to the user.
Thanks