mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
RBAC: generated prefixed uids for external service role (#76601)
* Replace FixedRoleUID function with a common function to generate these prefixes * Use common function to generate prefixed uid for external service accounts Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com> --------- Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com>
This commit is contained in:
@@ -319,22 +319,9 @@ func (cmd *SaveExternalServiceRoleCommand) Validate() error {
|
||||
}
|
||||
|
||||
const (
|
||||
GlobalOrgID = 0
|
||||
FixedRolePrefix = "fixed:"
|
||||
FixedRoleUIDPrefix = "fixed_"
|
||||
ManagedRolePrefix = "managed:"
|
||||
BasicRolePrefix = "basic:"
|
||||
PluginRolePrefix = "plugins:"
|
||||
ExternalServiceRolePrefix = "externalservice:"
|
||||
BasicRoleUIDPrefix = "basic_"
|
||||
ExternalServiceRoleUIDPrefix = "externalservice_"
|
||||
RoleGrafanaAdmin = "Grafana Admin"
|
||||
|
||||
GlobalOrgID = 0
|
||||
GeneralFolderUID = "general"
|
||||
|
||||
// Basic Role None
|
||||
BasicRoleNoneUID = "basic_none"
|
||||
BasicRoleNoneName = "basic:none"
|
||||
RoleGrafanaAdmin = "Grafana Admin"
|
||||
|
||||
// Permission actions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user