From cc88c5f4b84da57c425cbdb7dc8b391b1942b503 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Fri, 28 Aug 2015 15:52:29 +0100 Subject: Implement more fine-grained external storage permissions model VisibilityTrait -> PermissionsTrait PermissionsTrait stores two sets of data, $permissions and $allowedPermissions (analogous to $visibility and $allowedVisibility of VisibilityTrait). Each set is a map of user type ('admin' or 'personal') to permissions (mounting permission, create permission). The result is that a backend can now be restricted for creation, while still allowing it to be mounted. This is useful for deprecating backends or auth mechanisms, preventing new storages being created, while still allowing existing storages to be mounted. --- apps/files_external/templates/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_external/templates') diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php index 5b79edf6cf7..63a3a19de2f 100644 --- a/apps/files_external/templates/settings.php +++ b/apps/files_external/templates/settings.php @@ -197,7 +197,7 @@

class="hidden"> t('Allow users to mount the following external storage')); ?>
- isVisibleFor(BackendService::VISIBILITY_PERSONAL)) print_unescaped(' checked="checked"'); ?> /> + isPermitted(BackendService::USER_PERSONAL, BackendService::PERMISSION_MOUNT)) print_unescaped(' checked="checked"'); ?> />
-- cgit v1.2.3