mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +00:00
repo owner and admin can unlock file (#4791)
Co-authored-by: lian <lian@seafile.com>
This commit is contained in:
@@ -493,7 +493,7 @@ export const Utils = {
|
||||
return list;
|
||||
},
|
||||
|
||||
getFileOperationList: function(currentRepoInfo, dirent, isContextmenu) {
|
||||
getFileOperationList: function(isRepoOwner, currentRepoInfo, dirent, isContextmenu) {
|
||||
let list = [];
|
||||
const { SHARE, DOWNLOAD, DELETE, RENAME, MOVE, COPY, TAGS, UNLOCK, LOCK,
|
||||
COMMENT, HISTORY, ACCESS_LOG, OPEN_VIA_CLIENT } = TextTranslation;
|
||||
@@ -525,7 +525,7 @@ export const Utils = {
|
||||
|
||||
if (isPro) {
|
||||
if (dirent.is_locked) {
|
||||
if (dirent.locked_by_me || dirent.lock_owner == 'OnlineOffice') {
|
||||
if (dirent.locked_by_me || dirent.lock_owner == 'OnlineOffice' || isRepoOwner || currentRepoInfo.id_admin) {
|
||||
list.push(UNLOCK);
|
||||
}
|
||||
} else {
|
||||
@@ -560,7 +560,7 @@ export const Utils = {
|
||||
getDirentOperationList: function(isRepoOwner, currentRepoInfo, dirent, isContextmenu) {
|
||||
return dirent.type == 'dir' ?
|
||||
Utils.getFolderOperationList(isRepoOwner, currentRepoInfo, dirent, isContextmenu) :
|
||||
Utils.getFileOperationList(currentRepoInfo, dirent, isContextmenu);
|
||||
Utils.getFileOperationList(isRepoOwner, currentRepoInfo, dirent, isContextmenu);
|
||||
},
|
||||
|
||||
sharePerms: function(permission) {
|
||||
|
Reference in New Issue
Block a user