Implement CoreRole Authorizer (#112401)

This commit is contained in:
Mihai Turdean
2025-10-15 20:27:59 +00:00
committed by GitHub
parent 5a516197b6
commit ae5ff7e8f0
4 changed files with 486 additions and 2 deletions
+11 -1
View File
@@ -193,7 +193,17 @@ func NewMapperRegistry() MapperRegistry {
// Teams is a special case. We translate user permissions from id to uid based.
"teams": newResourceTranslation("teams", "uid", false, true),
// No need to skip scope on create for roles because we translate `permissions:type:delegate` to `roles:*``
"coreroles": newResourceTranslation("roles", "uid", false, false),
"coreroles": translation{
resource: "roles",
attribute: "uid",
verbMapping: map[string]string{
utils.VerbGet: "roles:read",
utils.VerbList: "roles:read",
utils.VerbWatch: "roles:read",
},
folderSupport: false,
skipScopeOnCreate: false,
},
"roles": translation{
resource: "roles",
attribute: "uid",