1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

add lock_owner (#2881)

* add lock_owner

* repair lock bug

* permission bug repair
This commit is contained in:
杨顺强
2019-01-24 17:58:09 +08:00
committed by Daniel Pan
parent 9f0c98f3f1
commit 908b4c4b39
2 changed files with 5 additions and 3 deletions

View File

@@ -409,7 +409,7 @@ class DirentListItem extends React.Component {
<img src={`${siteRoot}${dirent.encoded_thumbnail_src}`} className="thumbnail" alt="" /> :
<img src={iconUrl} width="24" alt='' />
}
{dirent.is_locked && <img className="locked" src={mediaUrl + 'img/file-locked-32.png'} alt={gettext('locked')} />}
{dirent.is_locked && <img className="locked" src={mediaUrl + 'img/file-locked-32.png'} alt={gettext('locked')} title={dirent.lock_owner}/>}
</div>
</td>
<td className="name">

View File

@@ -55,8 +55,10 @@ class DirentMenu extends React.Component {
}
menuList.push('Copy');
if (isPro) {
if (dirent.is_locked && dirent.locked_by_me) {
if (dirent.is_locked) {
if (dirent.locked_by_me || (dirent.lock_owner === "OnlineOffice" && permission === 'rw')) {
menuList.push('Unlock');
}
} else {
menuList.push('Lock');
}