Refactor to use pathLocks ability fields from graphql
What does this MR do and why?
Refactor to use pathLocks ability fields from graphql
Previously, we found the permissions returning from the graphql was incorrect. To temporarily unlock progress, we implemented the correct logic in !178087 (merged). Now backend has fixed the logic so we're removing the logic added and use the newly added ability fields (createPathLock, destroyPathLock) instead.
References
- !178087 (merged)
- backend query was updated in #512677 (closed)
- documentation
Screenshots or screen recordings
| Test scenarios & expected behaviour | Video |
|---|---|
|
User has maintainer role User can unlock directory they locked and locked by others |
|
|
User has developer role User can unlock directory they locked but cannot unlock directory locked by others |
|
|
User has guest role User cannot lock or unlock directory |
How to set up and validate locally
- Go to Project overview or Code / Repository
- Enable
blob_repository_vue_header_appflag - Log in as a user who has developer permission to a project
- User should be able to lock and unlock a directory (e.g. button should not be disabled)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #513414 (closed)