mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-16 18:42:34 -04:00
Add new "delete-all-spaces" permission
This is assigned to the Admin role by default and allows to cleanup orphaned spaces (e.g. where the owner as been deleted) Fixes: #4196
This commit is contained in:
committed by
Ralf Haferkamp
parent
746a532a76
commit
e5543d4465
6
changelog/unreleased/delete-orphaned-spaces.md
Normal file
6
changelog/unreleased/delete-orphaned-spaces.md
Normal file
@@ -0,0 +1,6 @@
|
||||
Enhancement: Introduce "delete-all-spaces" permission
|
||||
|
||||
This is assigned to the Admin role by default and allows to cleanup orphaned
|
||||
spaces (e.g. where the owner as been deleted)
|
||||
|
||||
https://github.com/owncloud/ocis/issues/4196
|
||||
@@ -48,6 +48,11 @@ const (
|
||||
// DeleteHomeSpacesPermissionName is the hardcoded setting name for the delete home space permission
|
||||
DeleteHomeSpacesPermissionName string = "delete-all-home-spaces"
|
||||
|
||||
// DeleteAllSpacesPermissionID is the hardcoded setting UUID for the delete all spaces permission
|
||||
DeleteAllSpacesPermissionID string = "fb60b004-c1fa-4f09-bf87-55ce7d46ac61"
|
||||
// DeleteAllSpacesPermissionName is the hardcoded setting name for the delete all space permission
|
||||
DeleteAllSpacesPermissionName string = "delete-all-spaces"
|
||||
|
||||
settingUUIDProfileLanguage = "aa8cfbe5-95d4-4f7e-a032-c3c01f5f062f"
|
||||
|
||||
// AccountManagementPermissionID is the hardcoded setting UUID for the account management permission
|
||||
@@ -225,6 +230,21 @@ func generateBundleAdminRole() *settingsmsg.Bundle {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Id: DeleteAllSpacesPermissionID,
|
||||
Name: DeleteAllSpacesPermissionName,
|
||||
DisplayName: "Delete AllSpaces",
|
||||
Description: "This permission allows to delete all spaces.",
|
||||
Resource: &settingsmsg.Resource{
|
||||
Type: settingsmsg.Resource_TYPE_SYSTEM,
|
||||
},
|
||||
Value: &settingsmsg.Setting_PermissionValue{
|
||||
PermissionValue: &settingsmsg.Permission{
|
||||
Operation: settingsmsg.Permission_OPERATION_DELETE,
|
||||
Constraint: settingsmsg.Permission_CONSTRAINT_ALL,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user