[go: up one dir, main page]

Skip to content

[Draft] Edit file: Make locked status clearer when user does not have permission to edit locked file

Context

#516868 (closed)

Problem

Locked state is surfaced in the file page in #4623 (closed). If a user tries to edit a file, there is little to no indication on the Edit file page that the file is locked:

In-flight: File page Current: Edit file page
lock-blobpage-havepermission.jpg editblob.png

For users who have permission to modify a locked file (the locker, anyone with Maintainer access), this may not be a huge issue.

However, if users do not have permission to modify a locked file, we do not surface this information about the lock until a user either tries to commit changes, or after a user creates a merge request and looks at the pipeline.

User has permission to commit to branch + permission to unlock file User does NOT have permission to unlock file
Default branch

editblob.png

commitchanges.png

lock-editblob-nopermission.png

lock-editblob-nopermission-commitchanges.png

  • Users cannot commit changes into this branch
Non-default branch

editblob.png

lock-editblob-nopermission-nondefaultbranch.png

lock-editblob-nopermission-nondefaultbranch-commitchanges.png

lock-editblob-nopermission-nondefaultbranch-mr.png

  • Users can still commit changes into any non-default branch
  • Users cannot merge their changes into the default branch

Implementation breakdown

Design change Issue

Default branch updates

  • Default branch
  • Disable the Replace and Delete buttons for users who do not have permission to unlock a file

#516868 (closed)

Commit changes modal updates

  • Non-default branches
  • Update the commit changes modal in the Replace Delete Edit flows to inform users of locking status when they do not have permission to unlock a file

#521439

Edit page updates

  • Update the Edit page or related flows to inform users of locking status when they do not have permission to unlock a file

#521831 (this)

Design proposal [WIP]

User HAS permission to commit to branch + HAS permission to unlock file User HAS permission to commit to branch + does NOT have permission to unlock file User does NOT have permission to commit to branch + does NOT have permission to unlock file
Default branch TBD TBD TBD
Non-default branch TBD TBD TBD
TBD @alyssatrinh
  • How can we better surface the lock status on the Edit file page or adjacent flows so users are more aware of system status / permissions they have?
  • Would it be more appropriate to surface this information when users create a merge request?
  • 🚧 Figma WIP
Edited by 🤖 GitLab Bot 🤖