diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2021-04-19 16:10:51 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2021-04-19 16:10:51 +0300 |
commit | 68dadc01af263435331e080589723787c2376f8a (patch) | |
tree | a36c48c8500790ae984031ade0de254f4514d8b6 /apps/files_sharing/src/models | |
parent | 9a69b8839389f133db55a41e1c2ba4435fd50c19 (diff) |
Consider read permission in sharing tab
When updating a share we should make sure to use all the old permissions
(and only change what we actually changed). So the READ permission in
this case should also be fetched instead of always granted.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/src/models')
-rw-r--r-- | apps/files_sharing/src/models/Share.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_sharing/src/models/Share.js b/apps/files_sharing/src/models/Share.js index 085eab056df..7a4b96261c0 100644 --- a/apps/files_sharing/src/models/Share.js +++ b/apps/files_sharing/src/models/Share.js @@ -450,6 +450,18 @@ export default class Share { } // PERMISSIONS Shortcuts + + /** + * Does this share have READ permissions + * + * @returns {boolean} + * @readonly + * @memberof Share + */ + get hasReadPermission() { + return !!((this.permissions & OC.PERMISSION_READ)) + } + /** * Does this share have CREATE permissions * |