Story 2.0.3.1. RT. Enforce Role-Based Logout and Login Prompt

Content

General info

Implement middleware that checks if the user’s role matches the content of the page they are attempting to access. If the user’s role does not correspond to the content, the system should force a logout and redirect the user to the login page. Specifically, when a CRM admin accesses Rocken Talent, the user should be logged out and redirected to the login page instead of seeing the empty content on home page:

image-20250225-074418.png

Additionally, a toast message should be displayed informing the user of the forced logout.

User story

As a CRM admin user,
I want to be logged out and redirected to the login page if I try to access Rocken Talent with an invalid role,
so that I can log in with the correct role to access the appropriate content.


RT-6670

Получение подробных данных проблемы…
СТАТУС

Visual design:

https://www.figma.com/design/I5CXH7H3ICD0vfA1kPbcVf/Rocken-Design?node-id=63232-114896&t=UlVST2DDCCwVAxi1-4

#

Acceptance Criteria

01

Scenario: Detect Invalid Role Access
Given I am a CRM admin logged into the system,
When I try to access a Rocken Talent page that requires a different role,
Then I should be logged out of the system and redirected to the login page.

02

Scenario: Display Toast Message on Forced Logout
Given I am logged in with a CRM admin role but try to access Rocken Talent,
When the system logs me out and redirects me to the login page,
Then I should see a toast message indicating that I need to log out and log in again to access the correct content.

image-20250226-110719.png

03

Scenario: Role-Based Redirect to Login Page
Given I am a CRM admin and try to access Rocken Talent,
When the system identifies a role mismatch,
Then I should be redirected to the login page to re-authenticate with the correct role.

Comments

Leave a Reply