bring back CRUDS permissions for federated shares
This commit is contained in:
parent
14fdafaede
commit
4ab02c0c76
|
@ -28,22 +28,19 @@
|
||||||
'<label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' +
|
'<label for="mail-{{cid}}-{{shareWith}}">{{notifyByMailLabel}}</label>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'{{/unless}} {{/if}}' +
|
'{{/unless}} {{/if}}' +
|
||||||
'{{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' +
|
'{{#if isResharingAllowed}} {{#if sharePermissionPossible}}' +
|
||||||
'<span class="shareOption">' +
|
'<span class="shareOption">' +
|
||||||
'<input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' +
|
'<input id="canShare-{{cid}}-{{shareWith}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />' +
|
||||||
'<label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' +
|
'<label for="canShare-{{cid}}-{{shareWith}}">{{canShareLabel}}</label>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'{{/unless}} {{/if}} {{/if}}' +
|
'{{/if}} {{/if}}' +
|
||||||
'{{#if editPermissionPossible}}' +
|
'{{#if editPermissionPossible}}' +
|
||||||
'<span class="shareOption">' +
|
'<span class="shareOption">' +
|
||||||
'<input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' +
|
'<input id="canEdit-{{cid}}-{{shareWith}}" type="checkbox" name="edit" class="permissions checkbox" {{#if hasEditPermission}}checked="checked"{{/if}} />' +
|
||||||
'<label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' +
|
'<label for="canEdit-{{cid}}-{{shareWith}}">{{canEditLabel}}</label>' +
|
||||||
'{{#unless isRemoteShare}}' +
|
|
||||||
'<a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
|
'<a href="#" class="showCruds"><img class="svg" alt="{{crudsLabel}}" src="{{triangleSImage}}"/></a>' +
|
||||||
'{{/unless}}' +
|
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'{{/if}}' +
|
'{{/if}}' +
|
||||||
'{{#unless isRemoteShare}}' +
|
|
||||||
'<div class="cruds hidden">' +
|
'<div class="cruds hidden">' +
|
||||||
'{{#if createPermissionPossible}}' +
|
'{{#if createPermissionPossible}}' +
|
||||||
'<span class="shareOption">' +
|
'<span class="shareOption">' +
|
||||||
|
@ -57,14 +54,13 @@
|
||||||
'<label for="canUpdate-{{cid}}-{{shareWith}}">{{updatePermissionLabel}}</label>' +
|
'<label for="canUpdate-{{cid}}-{{shareWith}}">{{updatePermissionLabel}}</label>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'{{/if}}' +
|
'{{/if}}' +
|
||||||
'{{#if deletePermissionPossible}} {{#unless isRemoteShare}}' +
|
'{{#if deletePermissionPossible}}' +
|
||||||
'<span class="shareOption">' +
|
'<span class="shareOption">' +
|
||||||
'<input id="canDelete-{{cid}}-{{shareWith}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>' +
|
'<input id="canDelete-{{cid}}-{{shareWith}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>' +
|
||||||
'<label for="canDelete-{{cid}}-{{shareWith}}">{{deletePermissionLabel}}</label>' +
|
'<label for="canDelete-{{cid}}-{{shareWith}}">{{deletePermissionLabel}}</label>' +
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'{{/unless}} {{/if}}' +
|
'{{/if}}' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'{{/unless}}' +
|
|
||||||
'</li>' +
|
'</li>' +
|
||||||
'{{/each}}' +
|
'{{/each}}' +
|
||||||
'</ul>'
|
'</ul>'
|
||||||
|
@ -125,10 +121,6 @@
|
||||||
shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'group') + ')';
|
shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'group') + ')';
|
||||||
} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {
|
} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {
|
||||||
shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'remote') + ')';
|
shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'remote') + ')';
|
||||||
hasPermissionOverride = {
|
|
||||||
createPermissionPossible: true,
|
|
||||||
updatePermissionPossible: true
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return _.extend(hasPermissionOverride, {
|
return _.extend(hasPermissionOverride, {
|
||||||
|
|
|
@ -411,12 +411,6 @@
|
||||||
if(!_.isObject(share)) {
|
if(!_.isObject(share)) {
|
||||||
throw "Unknown Share";
|
throw "Unknown Share";
|
||||||
}
|
}
|
||||||
if( share.share_type === OC.Share.SHARE_TYPE_REMOTE
|
|
||||||
&& ( permission === OC.PERMISSION_SHARE
|
|
||||||
|| permission === OC.PERMISSION_DELETE))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return (share.permissions & permission) === permission;
|
return (share.permissions & permission) === permission;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue