mirror of
https://github.com/rancher/types.git
synced 2025-07-01 07:51:48 +00:00
DisplayName for role types
This commit is contained in:
parent
430ef19e10
commit
cff909bb7b
@ -23,8 +23,9 @@ type GlobalRole struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
Rules []rbacv1.PolicyRule `json:"rules,omitempty"`
|
||||
Builtin bool `json:"builtin"`
|
||||
DisplayName string `json:"displayName,omitempty" norman:"required"`
|
||||
Rules []rbacv1.PolicyRule `json:"rules,omitempty"`
|
||||
Builtin bool `json:"builtin"`
|
||||
}
|
||||
|
||||
type GlobalRoleBinding struct {
|
||||
@ -39,6 +40,7 @@ type RoleTemplate struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
DisplayName string `json:"displayName,omitempty" norman:"required"`
|
||||
Rules []rbacv1.PolicyRule `json:"rules,omitempty"`
|
||||
Builtin bool `json:"builtin"`
|
||||
External bool `json:"external"`
|
||||
|
@ -87,9 +87,9 @@ func clusterTypes(schemas *types.Schemas) *types.Schemas {
|
||||
|
||||
func authzTypes(schemas *types.Schemas) *types.Schemas {
|
||||
return schemas.
|
||||
AddMapperForType(&Version, v3.Project{},
|
||||
m.DisplayName{},
|
||||
).
|
||||
AddMapperForType(&Version, v3.Project{}, m.DisplayName{}).
|
||||
AddMapperForType(&Version, v3.GlobalRole{}, m.DisplayName{}).
|
||||
AddMapperForType(&Version, v3.RoleTemplate{}, m.DisplayName{}).
|
||||
AddMapperForType(&Version, v3.ProjectRoleTemplateBinding{},
|
||||
&m.Move{From: "subject/name", To: "subjectName"},
|
||||
&m.Move{From: "subject/kind", To: "subjectKind"},
|
||||
|
Loading…
Reference in New Issue
Block a user