diff options
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r-- | core/js/shareitemmodel.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js index 4118a8a0188..afe86fa464b 100644 --- a/core/js/shareitemmodel.js +++ b/core/js/shareitemmodel.js @@ -487,6 +487,13 @@ }, /** + * @return {int} + */ + getPermissions: function() { + return this.get('permissions'); + }, + + /** * @returns {boolean} */ sharePermissionPossible: function() { @@ -568,6 +575,17 @@ || this.hasDeletePermission(shareIndex); }, + /** + * @returns {int} + */ + linkSharePermissions: function() { + if (!this.hasLinkShare()) { + return -1; + } else { + return this.get('linkShare').permissions; + } + }, + _getUrl: function(base, params) { params = _.extend({format: 'json'}, params || {}); return OC.linkToOCS('apps/files_sharing/api/v1', 2) + base + '?' + OC.buildQueryString(params); |