1
0
mirror of https://github.com/rancher/types.git synced 2025-07-10 20:13:04 +00:00

Add enabled field to user

This commit is contained in:
Dan Ramich 2018-06-26 16:29:48 -07:00 committed by Craig Jellick
parent d00e627aaf
commit 8fa06eae27
3 changed files with 12 additions and 0 deletions

View File

@ -33,6 +33,7 @@ type User struct {
MustChangePassword bool `json:"mustChangePassword,omitempty"`
PrincipalIDs []string `json:"principalIds,omitempty" norman:"type=array[reference[principal]]"`
Me bool `json:"me,omitempty"`
Enabled *bool `json:"enabled,omitempty" norman:"default=true"`
}
// UserAttribute will have a CRD (and controller) generated for it, but will not be exposed in the API.

View File

@ -6439,6 +6439,15 @@ func (in *User) DeepCopyInto(out *User) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Enabled != nil {
in, out := &in.Enabled, &out.Enabled
if *in == nil {
*out = nil
} else {
*out = new(bool)
**out = **in
}
}
return
}

View File

@ -10,6 +10,7 @@ const (
UserFieldCreated = "created"
UserFieldCreatorID = "creatorId"
UserFieldDescription = "description"
UserFieldEnabled = "enabled"
UserFieldLabels = "labels"
UserFieldMe = "me"
UserFieldMustChangePassword = "mustChangePassword"
@ -28,6 +29,7 @@ type User struct {
Created string `json:"created,omitempty" yaml:"created,omitempty"`
CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
Me bool `json:"me,omitempty" yaml:"me,omitempty"`
MustChangePassword bool `json:"mustChangePassword,omitempty" yaml:"mustChangePassword,omitempty"`