@ -40,7 +40,7 @@
ref = "canEdit"
: checked . sync = "canEdit"
: value = "permissionsEdit"
: disabled = "saving ">
: disabled = "saving || !canSetEdit ">
{ { t ( 'files_sharing' , 'Allow editing' ) } }
< / ActionCheckbox >
@ -50,7 +50,7 @@
ref = "canCreate"
: checked . sync = "canCreate"
: value = "permissionsCreate"
: disabled = "saving ">
: disabled = "saving || !canSetCreate ">
{ { t ( 'files_sharing' , 'Allow creating' ) } }
< / ActionCheckbox >
@ -60,7 +60,7 @@
ref = "canDelete"
: checked . sync = "canDelete"
: value = "permissionsDelete"
: disabled = "saving ">
: disabled = "saving || !canSetDelete ">
{ { t ( 'files_sharing' , 'Allow deleting' ) } }
< / ActionCheckbox >
@ -69,7 +69,7 @@
ref = "canReshare"
: checked . sync = "canReshare"
: value = "permissionsShare"
: disabled = "saving ">
: disabled = "saving || !canSetReshare ">
{ { t ( 'files_sharing' , 'Allow resharing' ) } }
< / ActionCheckbox >
@ -216,6 +216,54 @@ export default {
&& this . share . type !== this . SHARE _TYPES . SHARE _TYPE _REMOTE _GROUP
} ,
/ * *
* Can the sharer set whether the sharee can edit the file ?
*
* @ returns { boolean }
* /
canSetEdit ( ) {
/ / I f t h e o w n e r r e v o k e d t h e p e r m i s s i o n a f t e r t h e r e s h a r e r g r a n t e d i t
/ / t h e s h a r e s t i l l h a s t h e p e r m i s s i o n , a n d t h e r e s h a r e r i s s t i l l
/ / a l l o w e d t o r e v o k e i t t o o ( b u t n o t t o g r a n t i t a g a i n ) .
return ( this . fileInfo . sharePermissions & OC . PERMISSION _UPDATE ) || this . canEdit
} ,
/ * *
* Can the sharer set whether the sharee can create the file ?
*
* @ returns { boolean }
* /
canSetCreate ( ) {
/ / I f t h e o w n e r r e v o k e d t h e p e r m i s s i o n a f t e r t h e r e s h a r e r g r a n t e d i t
/ / t h e s h a r e s t i l l h a s t h e p e r m i s s i o n , a n d t h e r e s h a r e r i s s t i l l
/ / a l l o w e d t o r e v o k e i t t o o ( b u t n o t t o g r a n t i t a g a i n ) .
return ( this . fileInfo . sharePermissions & OC . PERMISSION _CREATE ) || this . canCreate
} ,
/ * *
* Can the sharer set whether the sharee can delete the file ?
*
* @ returns { boolean }
* /
canSetDelete ( ) {
/ / I f t h e o w n e r r e v o k e d t h e p e r m i s s i o n a f t e r t h e r e s h a r e r g r a n t e d i t
/ / t h e s h a r e s t i l l h a s t h e p e r m i s s i o n , a n d t h e r e s h a r e r i s s t i l l
/ / a l l o w e d t o r e v o k e i t t o o ( b u t n o t t o g r a n t i t a g a i n ) .
return ( this . fileInfo . sharePermissions & OC . PERMISSION _DELETE ) || this . canDelete
} ,
/ * *
* Can the sharer set whether the sharee can reshare the file ?
*
* @ returns { boolean }
* /
canSetReshare ( ) {
/ / I f t h e o w n e r r e v o k e d t h e p e r m i s s i o n a f t e r t h e r e s h a r e r g r a n t e d i t
/ / t h e s h a r e s t i l l h a s t h e p e r m i s s i o n , a n d t h e r e s h a r e r i s s t i l l
/ / a l l o w e d t o r e v o k e i t t o o ( b u t n o t t o g r a n t i t a g a i n ) .
return ( this . fileInfo . sharePermissions & OC . PERMISSION _SHARE ) || this . canReshare
} ,
/ * *
* Can the sharee edit the shared file ?
* /