[BUG] Lock icon does not show for exclusive file locks in tree view in CE
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Currently, when a file has exclusive file lock applied in GitLab Community Edition (CE), the lock icon (
Further details about current conditions
As confirmed in the related issue (#224475 (comment 2404218837)), there is partial support for file locking in CE:
-
✅ Users can edit.gitattributesfile or use command line to set up locks -
✅ Users can lock/unlock files using command line -
❌ The lock icon is not shown next to locked files in the tree view
| CE | EE |
|---|---|
![]() |
![]() |
The code investigation reveals:
- The lock icon is rendered in
app/assets/javascripts/repository/components/table/row.vue - The logic depends on
commitDatawhich is only fetched in the EE version throughcommits_services -
lockLabelis queried with EE commit.fragment.graphql that is a part of commits.query.graphql and then provided for the repository Vue app - on the backend,
lock_labelis defined on EE TreeSummary
Acceptance criteria
-
Lock icon appears next to exclusively locked files in the tree view in CE -
Hovering over the lock icon shows a tooltip with "File locked" or "File locked by [username]" (if possible) -
The implementation maintains all existing functionality in EE
Related issues
- #224475 (closed) Show lock icon in blob viewer
- #4623 (closed) Show who locked a file
Edited by 🤖 GitLab Bot 🤖

