File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ const inlineAction = new FileAction({
8585 const node = nodes [ 0 ]
8686 const state = getLockStateFromAttributes ( node )
8787
88- return ( node . permissions & Permission . UPDATE ) !== 0 && state . isLocked
88+ return state . isLocked
8989 } ,
9090} )
9191
@@ -115,8 +115,10 @@ const menuAction = new FileAction({
115115 }
116116
117117 const canToggleLock = canLock ( nodes [ 0 ] ) || canUnlock ( nodes [ 0 ] )
118+ const isLocked = getLockStateFromAttributes ( nodes [ 0 ] ) . isLocked
119+ const isUpdatable = ( nodes [ 0 ] . permissions & Permission . UPDATE ) !== 0
118120
119- return nodes [ 0 ] . type === FileType . File && canToggleLock && ( nodes [ 0 ] . permissions & Permission . UPDATE ) !== 0
121+ return nodes [ 0 ] . type === FileType . File && canToggleLock && ( isUpdatable || isLocked )
120122 } ,
121123
122124 async exec ( node : Node ) {
You can’t perform that action at this time.
0 commit comments