Improve access request error handling
What does this MR do and why?
We recently added support for linking to access requests: !138336 (merged)
However, now this makes it easier to land on an access request when you already have access or when you aren't logged in.
This MR handles both the above cases, giving you an approriate warning or redirecting to sign in.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Grab an access request link for a project + a group e.g. http://gdk.vm:3000/groups/gitlab-org/-/group_members/request_access // http://gdk.vm:3000/gitlab-org/gitlab-shell/-/project_members/request_access
- Logout of GDK and try and hit the request access links (you should get redirected to login)
- Continue to login (not as admin/root) and ensure the access request gets submitted and a confirmation appears
- Repeat steps 1 - 3 but this time create a new account and ensure the access request gets submitted and a confirmation appears
- Now you have the 2 pending access requests... remain logged in and try and follow the request access links again- you should get a message to say you have already requested access.
- Now approve the requests (logged in as admin/root)
- Try one last time both request access links- you should get a message to say you already have access
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Lee Tickett