mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 07:39:23 -04:00
Remove "Reject share" for pending remote shares
In the list of pending shares, the option for rejecting the share has been removed. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
This commit is contained in:
parent
7130a98e47
commit
46b8cf4f64
4 changed files with 18 additions and 3 deletions
|
|
@ -155,6 +155,9 @@
|
|||
if (_.isFunction(action.render)) {
|
||||
actionSpec.render = action.render;
|
||||
}
|
||||
if (_.isFunction(action.shouldRender)) {
|
||||
actionSpec.shouldRender = action.shouldRender;
|
||||
}
|
||||
if (!this.actions[mime]) {
|
||||
this.actions[mime] = {};
|
||||
}
|
||||
|
|
@ -397,6 +400,11 @@
|
|||
* @param {OCA.Files.FileActionContext} context rendering context
|
||||
*/
|
||||
_renderInlineAction: function(actionSpec, isDefault, context) {
|
||||
if (actionSpec.shouldRender) {
|
||||
if (!actionSpec.shouldRender(context)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
var renderFunc = actionSpec.render || _.bind(this._defaultRenderAction, this);
|
||||
var $actionEl = renderFunc(actionSpec, isDefault, context);
|
||||
if (!$actionEl || !$actionEl.length) {
|
||||
|
|
|
|||
|
|
@ -315,6 +315,12 @@ OCA.Sharing.App = {
|
|||
permissions: OC.PERMISSION_ALL,
|
||||
iconClass: 'icon-close',
|
||||
type: OCA.Files.FileActions.TYPE_INLINE,
|
||||
shouldRender(context) {
|
||||
if (context.$file.attr('data-remote-id')) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
actionHandler(fileName, context) {
|
||||
const shareId = context.$file.data('shareId')
|
||||
let shareBase = 'shares'
|
||||
|
|
|
|||
|
|
@ -96,6 +96,10 @@
|
|||
$tr.attr('data-share-permissions', permission)
|
||||
}
|
||||
|
||||
if (fileData.remoteId) {
|
||||
$tr.attr('data-remote-id', fileData.remoteId)
|
||||
}
|
||||
|
||||
// add row with expiration date for link only shares - influenced by _createRow of filelist
|
||||
if (this._linksOnly) {
|
||||
var expirationTimestamp = 0
|
||||
|
|
|
|||
|
|
@ -104,9 +104,6 @@ import escapeHTML from 'escape-html'
|
|||
if (fileData.shareTypes) {
|
||||
tr.attr('data-share-types', fileData.shareTypes.join(','))
|
||||
}
|
||||
if (fileData.remoteId) {
|
||||
tr.attr('data-remote-id', fileData.remoteId)
|
||||
}
|
||||
return tr
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue