@ -404,10 +404,14 @@ export default {
* /
canDownload : {
get ( ) {
return this . share . hasDownloadPermission
return this . share . attributes. find ( attr => attr . key === 'download' ) ? . enabled || false
} ,
set ( checked ) {
this . updateAtomicPermissions ( { isDownloadChecked : checked } )
/ / F i n d t h e ' d o w n l o a d ' a t t r i b u t e a n d u p d a t e i t s v a l u e
const downloadAttr = this . share . attributes . find ( attr => attr . key === 'download' )
if ( downloadAttr ) {
downloadAttr . enabled = checked
}
} ,
} ,
/ * *
@ -723,7 +727,6 @@ export default {
isCreateChecked = this . canCreate ,
isDeleteChecked = this . canDelete ,
isReshareChecked = this . canReshare ,
isDownloadChecked = this . canDownload ,
} = { } ) {
/ / c a l c p e r m i s s i o n s i f c h e c k e d
const permissions = 0
@ -733,9 +736,6 @@ export default {
| ( isEditChecked ? ATOMIC _PERMISSIONS . UPDATE : 0 )
| ( isReshareChecked ? ATOMIC _PERMISSIONS . SHARE : 0 )
this . share . permissions = permissions
if ( this . share . hasDownloadPermission !== isDownloadChecked ) {
this . $set ( this . share , 'hasDownloadPermission' , isDownloadChecked )
}
} ,
expandCustomPermissions ( ) {
if ( ! this . advancedSectionAccordionExpanded ) {
@ -909,8 +909,8 @@ export default {
shareType : share . shareType ,
shareWith : share . shareWith ,
permissions : share . permissions ,
attributes : JSON . stringify ( fileInfo . shareAttributes ) ,
expireDate : share . expireDate ,
attributes : JSON . stringify ( share . attributes ) ,
... ( share . note ? { note : share . note } : { } ) ,
... ( share . password ? { password : share . password } : { } ) ,
} )
@ -1054,7 +1054,7 @@ export default {
flex - direction : column ;
}
}
/* Target component based style in NcCheckboxRadioSwitch slot content*/
: deep ( span . checkbox - content _ _text . checkbox - radio - switch _ _text ) {
flex - wrap : wrap ;