-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add set space quota permission #2459
Conversation
Kudos, SonarCloud Quality Gate passed! |
I just saw there is no documentation regarding the current roles and permissions service, and this is an error. There should always be documentation regarding core concepts such as this one. Let me try to shed some light as best as I can. Let's have a look at a production example: {
BundleId: BundleUUIDRoleAdmin,
Setting: &settings.Setting{
Id: "7d81f103-0488-4853-bce5-98dcce36d649",
Name: "language-readwrite",
DisplayName: "Permission to read and set the language (anyone)",
Resource: &settings.Resource{
Type: settings.Resource_TYPE_SETTING,
Id: settingUUIDProfileLanguage,
},
Value: &settings.Setting_PermissionValue{
PermissionValue: &settings.Permission{
Operation: settings.Permission_OPERATION_READWRITE,
Constraint: settings.Permission_CONSTRAINT_ALL,
},
},
},
}, This is a permission being created and can be read as: [role admin] --- on resource type --> [user] --- can -- [ In short, an admin can edit the language setting of any user. So we are granting any user with the admin role a power to edit the settings on any user, and that setting is a If I read yours doing the same analysis: {
BundleId: BundleUUIDRoleAdmin,
Setting: &settings.Setting{
Id: SetSpaceQuotaPermissionID,
Name: SetSpaceQuotaPermissionName,
DisplayName: "Set Space Quota",
Description: "This permission allows to manage space quotas.",
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,
},
},
},
}, The first thing that comes to mind is that the permission is being applied on no resource (because there is no And I think you can drop the line |
Ok but then I also can just leave it in. :D |
In preparation for the upcoming spaces features a
SetSpaceQuota
permission was added.I'm not entirely sure about the permission to role assignment. Especially about the ResourceType: