mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Pending remote group share fixes
Only remove reject share for remote group shares Also fix share indicator to appear for remote group shares as well. Fix pending remote share icon to be the one of a share. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
This commit is contained in:
parent
37a65237ea
commit
9c0e1d8252
3 changed files with 12 additions and 2 deletions
|
|
@ -316,7 +316,9 @@ OCA.Sharing.App = {
|
|||
iconClass: 'icon-close',
|
||||
type: OCA.Files.FileActions.TYPE_INLINE,
|
||||
shouldRender(context) {
|
||||
if (context.$file.attr('data-remote-id')) {
|
||||
// disable rejecting group shares from the pending list because they anyway
|
||||
// land back into that same list
|
||||
if (context.$file.attr('data-remote-id') && parseInt(context.$file.attr('data-share-type'), 10) === OC.Share.SHARE_TYPE_REMOTE_GROUP) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@
|
|||
$tr.attr('data-remote-id', fileData.remoteId)
|
||||
}
|
||||
|
||||
if (fileData.shareType) {
|
||||
$tr.attr('data-share-type', fileData.shareType)
|
||||
}
|
||||
|
||||
// add row with expiration date for link only shares - influenced by _createRow of filelist
|
||||
if (this._linksOnly) {
|
||||
var expirationTimestamp = 0
|
||||
|
|
@ -333,6 +337,8 @@
|
|||
mtime: share.mtime * 1000,
|
||||
mimetype: share.mimetype,
|
||||
type: share.type,
|
||||
// remote share types are different and need to be mapped
|
||||
shareType: (parseInt(share.share_type, 10) === 1) ? OC.Share.SHARE_TYPE_REMOTE_GROUP : OC.Share.SHARE_TYPE_REMOTE,
|
||||
id: share.file_id,
|
||||
path: OC.dirname(share.mountpoint),
|
||||
permissions: share.permissions,
|
||||
|
|
@ -351,7 +357,7 @@
|
|||
|
||||
if (!file.type) {
|
||||
// pending shares usually have no type, so default to showing a directory icon
|
||||
file.mimetype = 'httpd/unix-directory'
|
||||
file.mimetype = 'dir-shared'
|
||||
}
|
||||
|
||||
file.shares = [{
|
||||
|
|
|
|||
|
|
@ -181,6 +181,8 @@ import escapeHTML from 'escape-html'
|
|||
hasShares = true
|
||||
} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {
|
||||
hasShares = true
|
||||
} else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {
|
||||
hasShares = true
|
||||
} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {
|
||||
hasShares = true
|
||||
} else if (shareType === OC.Share.SHARE_TYPE_ROOM) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue