fix the folder share

Signed-off-by: GretaD <gretadoci@gmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
GretaD 2019-12-16 17:12:20 +01:00 committed by John Molakvoæ (skjnldsv)
parent 57997fefa2
commit 455013c309
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
4 changed files with 24 additions and 12 deletions

Binary file not shown.

View file

@ -42,12 +42,24 @@
<!-- create permission --> <!-- create permission -->
<ActionCheckbox <ActionCheckbox
v-if="isFolder"
ref="canCreate" ref="canCreate"
:checked.sync="canCreate" :checked.sync="canCreate"
:value="permissionsCreate" :value="permissionsCreate"
:disabled="saving"> :disabled="saving">
{{ t('files_sharing', 'Allow creating') }} {{ t('files_sharing', 'Allow creating') }}
</ActionCheckbox> </ActionCheckbox>
<!-- delete permission -->
<ActionCheckbox
v-if="isFolder"
ref="canDelete"
:checked.sync="canDelete"
:value="permissionsDelete"
:disabled="saving">
{{ t('files_sharing', 'Allow deleting') }}
</ActionCheckbox>
<!-- reshare permission --> <!-- reshare permission -->
<ActionCheckbox <ActionCheckbox
ref="canReshare" ref="canReshare"
@ -57,14 +69,6 @@
{{ t('files_sharing', 'Allow resharing') }} {{ t('files_sharing', 'Allow resharing') }}
</ActionCheckbox> </ActionCheckbox>
<!-- delete permission -->
<ActionCheckbox
ref="canDelete"
:checked.sync="canDelete"
:value="permissionsDelete"
:disabled="saving">
{{ t('files_sharing', 'Allow deleting') }}
</ActionCheckbox>
<!-- expiration date --> <!-- expiration date -->
<ActionCheckbox :checked.sync="hasExpirationDate" <ActionCheckbox :checked.sync="hasExpirationDate"
:disabled="config.isDefaultExpireDateEnforced || saving" :disabled="config.isDefaultExpireDateEnforced || saving"
@ -255,6 +259,14 @@ export default {
}, },
}, },
/**
* Is the current share a folder ?
* @returns {boolean}
*/
isFolder() {
return this.fileInfo.type === 'dir'
},
/** /**
* Does the current share have an expiration date * Does the current share have an expiration date
* @returns {boolean} * @returns {boolean}

View file

@ -108,18 +108,18 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
// forThe()->checkbox("Can reshare") can not be used here; that would // forThe()->checkbox("Can reshare") can not be used here; that would
// return the checkbox itself, but the element that the user interacts // return the checkbox itself, but the element that the user interacts
// with is the label. // with is the label.
return Locator::forThe()->xpath("//label[normalize-space() = 'Can reshare']")-> return Locator::forThe()->xpath("//label[normalize-space() = 'Allow resharing']")->
descendantOf(self::shareWithMenu($sharedWithName))-> descendantOf(self::shareWithMenu($sharedWithName))->
describedAs("Can reshare checkbox in the share with $sharedWithName menu in the details view in Files app"); describedAs("Allow resharing checkbox in the share with $sharedWithName menu in the details view in Files app");
} }
/** /**
* @return Locator * @return Locator
*/ */
public static function canReshareCheckboxInput($sharedWithName) { public static function canReshareCheckboxInput($sharedWithName) {
return Locator::forThe()->checkbox("Can reshare")-> return Locator::forThe()->checkbox("Allow resharing")->
descendantOf(self::shareWithMenu($sharedWithName))-> descendantOf(self::shareWithMenu($sharedWithName))->
describedAs("Can reshare checkbox input in the share with $sharedWithName menu in the details view in Files app"); describedAs("Allow resharing checkbox input in the share with $sharedWithName menu in the details view in Files app");
} }
/** /**