Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/app.js4
-rw-r--r--apps/files_sharing/js/sharedfilelist.js8
-rw-r--r--apps/files_sharing/src/share.js2
3 files changed, 12 insertions, 2 deletions
diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js
index 64db7fac692..b384946e5c8 100644
--- a/apps/files_sharing/js/app.js
+++ b/apps/files_sharing/js/app.js
@@ -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
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index bffc71d7a07..17c72db1ffc 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -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 = [{
diff --git a/apps/files_sharing/src/share.js b/apps/files_sharing/src/share.js
index 385d42eaaea..bb160f8715d 100644
--- a/apps/files_sharing/src/share.js
+++ b/apps/files_sharing/src/share.js
@@ -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) {