Skip to content

Commit

Permalink
add create space permission
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christofas committed Sep 1, 2021
1 parent 413b888 commit 990d3aa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/create-space-permission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: add the create space permission

In preparation for the upcoming spaces features a `Create Space` permission was added.

https://github.com/owncloud/ocis/pull/2461
23 changes: 23 additions & 0 deletions settings/pkg/service/v0/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ const (
// SettingsManagementPermissionName is the hardcoded setting name for the settings management permission
SettingsManagementPermissionName string = "settings-management"

// CreateSpacePermissionID is the hardcoded setting UUID for the create space permission
CreateSpacePermissionID string = "79e13b30-3e22-11eb-bc51-0b9f0bad9a58"
// CreateSpacePermissionName is the hardcoded setting name for the create space permission
CreateSpacePermissionName string = "create-space"

settingUUIDProfileLanguage = "aa8cfbe5-95d4-4f7e-a032-c3c01f5f062f"

// AccountManagementPermissionID is the hardcoded setting UUID for the account management permission
Expand Down Expand Up @@ -331,6 +336,24 @@ func generatePermissionRequests() []*settings.AddSettingToBundleRequest {
},
},
},
{
BundleId: BundleUUIDRoleAdmin,
Setting: &settings.Setting{
Id: CreateSpacePermissionID,
Name: CreateSpacePermissionName,
DisplayName: "Create Space",
Description: "This permission allows to create new spaces.",
Resource: &settings.Resource{
Type: settings.Resource_TYPE_SYSTEM,
},
Value: &settings.Setting_PermissionValue{
PermissionValue: &settings.Permission{
Operation: settings.Permission_OPERATION_READWRITE,
Constraint: settings.Permission_CONSTRAINT_ALL,
},
},
},
},
}
}

Expand Down

0 comments on commit 990d3aa

Please sign in to comment.