Start: Initial state of the authorization process.
User Logs In: The user attempts to log in.
Session Check: The system checks if the user's session is valid.
Invalid Session: An error message is displayed.
Valid Session: The system checks if the user is approved.
Check User Approval: Core of the authorization check, where the system verifies if the user's ID is in the list of approved IDs for the requested path.
User Approved: The user is approved, and the requested content is displayed.
User Not Approved: The user is not approved, and an access denied message is shown.
+---------------------------------+
| Start |
+---------------------------------+
|
v
+---------------------------------+
| User Logs In |
+---------------------------------+
|
v
+---------------------------------+
| Session Check |
+---------------------------------+
/ | \
/ | \
/ | \
v | v
+---------------------------+ +---------------------------+
| Invalid Session | | Valid Session |
| Show Error Message | | Check User Approval |
+---------------------------+ +---------------------------+
| / \
| / \
v / \
+---------------------------+ v v
| Show Error Message | +----------------+ +---------------------------+
| | | User Approved | | User Not Approved |
| | | Display Content| | Show Access Denied Msg |
+---------------------------+ +----------------+ +---------------------------+