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

Screenshots or screen recordings

Test scenarios & expected behaviour Video

User has maintainer role

User can unlock directory they locked and locked by others

CleanShot 2025-03-20 at 17.48.56.mp4

User has developer role

User can unlock directory they locked but cannot unlock directory locked by others

CleanShot 2025-03-20 at 13.48.18.mp4

User has guest role

User cannot lock or unlock directory

CleanShot 2025-03-20 at 13.47.07.mp4

How to set up and validate locally

  1. Go to Project overview or Code / Repository
  2. Enable blob_repository_vue_header_app flag
  3. Log in as a user who has developer permission to a project
  4. 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)

Edited by Chaoyue Zhao

Merge request reports

Loading