коммит произвёл
GitHub
родитель
073bd3a6b7
Коммит
9408b98025
@@ -422,6 +422,7 @@ type Role struct {
|
||||
Permissions []string `json:"permissions"`
|
||||
SchemeManaged bool `json:"scheme_managed"`
|
||||
BuiltIn bool `json:"built_in"`
|
||||
SchemeId *string `json:"scheme_id"`
|
||||
}
|
||||
|
||||
func (r *Role) Auditable() map[string]any {
|
||||
@@ -436,6 +437,7 @@ func (r *Role) Auditable() map[string]any {
|
||||
"permissions": r.Permissions,
|
||||
"scheme_managed": r.SchemeManaged,
|
||||
"built_in": r.BuiltIn,
|
||||
"scheme_id": r.SchemeId,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,6 +458,7 @@ func (r *Role) MarshalYAML() (any, error) {
|
||||
Permissions []string `yaml:"permissions"`
|
||||
SchemeManaged bool `yaml:"scheme_managed"`
|
||||
BuiltIn bool `yaml:"built_in"`
|
||||
SchemeId *string `yaml:"scheme_id"`
|
||||
}{
|
||||
Id: r.Id,
|
||||
Name: r.Name,
|
||||
@@ -467,6 +470,7 @@ func (r *Role) MarshalYAML() (any, error) {
|
||||
Permissions: r.Permissions,
|
||||
SchemeManaged: r.SchemeManaged,
|
||||
BuiltIn: r.BuiltIn,
|
||||
SchemeId: r.SchemeId,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -482,6 +486,7 @@ func (r *Role) UnmarshalYAML(unmarshal func(any) error) error {
|
||||
Permissions []string `yaml:"permissions"`
|
||||
SchemeManaged bool `yaml:"scheme_managed"`
|
||||
BuiltIn bool `yaml:"built_in"`
|
||||
SchemeId *string `yaml:"scheme_id"`
|
||||
}{}
|
||||
|
||||
err := unmarshal(&out)
|
||||
@@ -513,6 +518,7 @@ func (r *Role) UnmarshalYAML(unmarshal func(any) error) error {
|
||||
Permissions: out.Permissions,
|
||||
SchemeManaged: out.SchemeManaged,
|
||||
BuiltIn: out.BuiltIn,
|
||||
SchemeId: out.SchemeId,
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user