[Draft] Edit file: Make locked status clearer when user does not have permission to edit locked file
Context
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 |
---|---|
![]() |
![]() |
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 |
|
|
Non-default branch |
|
Implementation breakdown
Design change | Issue |
---|---|
Default branch updates
|
|
Commit changes modal updates
|
|
Edit page updates
|
#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 |
@alyssatrinh
TBD- 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 🤖