Add grants to project
[ZITADOPER-1]
This commit is contained in:
@@ -32,6 +32,10 @@ type Role struct {
|
||||
DisplayName string `json:"displayName"`
|
||||
Group string `json:"group"`
|
||||
}
|
||||
type Grant struct {
|
||||
OrganizationRef OrganizationRef `json:"organizationRef"`
|
||||
RoleKeys []string `json:"roleKeys"`
|
||||
}
|
||||
|
||||
// ProjectSpec defines the desired state of Project
|
||||
type ProjectSpec struct {
|
||||
@@ -44,6 +48,8 @@ type ProjectSpec struct {
|
||||
// +optional
|
||||
Roles []Role `json:"roles"`
|
||||
// +optional
|
||||
Grants []Grant `json:"grants"`
|
||||
// +optional
|
||||
ProjectRoleAssertion bool `json:"projectRoleAssertion,omitempty"`
|
||||
// +optional
|
||||
ProjectRoleCheck bool `json:"projectRoleCheck,omitempty"`
|
||||
|
||||
@@ -154,6 +154,27 @@ func (in *DomainSettings) DeepCopy() *DomainSettings {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Grant) DeepCopyInto(out *Grant) {
|
||||
*out = *in
|
||||
out.OrganizationRef = in.OrganizationRef
|
||||
if in.RoleKeys != nil {
|
||||
in, out := &in.RoleKeys, &out.RoleKeys
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Grant.
|
||||
func (in *Grant) DeepCopy() *Grant {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(Grant)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Image) DeepCopyInto(out *Image) {
|
||||
*out = *in
|
||||
@@ -606,6 +627,13 @@ func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec) {
|
||||
*out = make([]Role, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.Grants != nil {
|
||||
in, out := &in.Grants, &out.Grants
|
||||
*out = make([]Grant, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec.
|
||||
|
||||
Reference in New Issue
Block a user