mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-17 19:05:13 +00:00
feat: Private label email policy (#813)
* Label Policy added * save * chore: update docs action * Save * Save * Get colors from DB * Variables inserted * Get images from global directory. * Add tests * Add tests * Corrections from mergerequest * Corrections from mergerequest * Test corrected. * Added colors to all notifications. * Added colors to Corrected text and formatting.all notifications. * Spelling error corrected. * fix: tests * Merge Branch corrected. * Step6 added * Corrections from mergerequest * fix: generate management * Formatted texts. * fix: migrations Co-authored-by: Florian Forster <[email protected]> Co-authored-by: adlerhurst <[email protected]> Co-authored-by: Fabiennne <[email protected]>
This commit is contained in:
co-authored by
Florian Forster
adlerhurst
Fabiennne
parent
cfd119924f
commit
42384763d1
@@ -149,6 +149,16 @@ var AdminService_AuthMethods = authz.MethodMapping{
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.admin.api.v1.AdminService/GetDefaultLabelPolicy": authz.Option{
|
||||
Permission: "iam.policy.read",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.admin.api.v1.AdminService/UpdateDefaultLabelPolicy": authz.Option{
|
||||
Permission: "iam.policy.write",
|
||||
CheckParam: "",
|
||||
},
|
||||
|
||||
"/caos.zitadel.admin.api.v1.AdminService/GetDefaultLoginPolicy": authz.Option{
|
||||
Permission: "iam.policy.read",
|
||||
CheckParam: "",
|
||||
|
||||
+1256
-884
File diff suppressed because it is too large
Load Diff
@@ -1420,6 +1420,58 @@ func local_request_AdminService_SearchIdps_0(ctx context.Context, marshaler runt
|
||||
|
||||
}
|
||||
|
||||
func request_AdminService_GetDefaultLabelPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.GetDefaultLabelPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_AdminService_GetDefaultLabelPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.GetDefaultLabelPolicy(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_AdminService_UpdateDefaultLabelPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq DefaultLabelPolicyUpdate
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.UpdateDefaultLabelPolicy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_AdminService_UpdateDefaultLabelPolicy_0(ctx context.Context, marshaler runtime.Marshaler, server AdminServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq DefaultLabelPolicyUpdate
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
newReader, berr := utilities.IOReaderFactory(req.Body)
|
||||
if berr != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
|
||||
}
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.UpdateDefaultLabelPolicy(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_AdminService_GetDefaultLoginPolicy_0(ctx context.Context, marshaler runtime.Marshaler, client AdminServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq empty.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
@@ -2355,6 +2407,46 @@ func RegisterAdminServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_GetDefaultLabelPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_AdminService_GetDefaultLabelPolicy_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_GetDefaultLabelPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("PUT", pattern_AdminService_UpdateDefaultLabelPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_AdminService_UpdateDefaultLabelPolicy_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_UpdateDefaultLabelPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_GetDefaultLoginPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -3216,6 +3308,46 @@ func RegisterAdminServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_GetDefaultLabelPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_GetDefaultLabelPolicy_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_GetDefaultLabelPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("PUT", pattern_AdminService_UpdateDefaultLabelPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_AdminService_UpdateDefaultLabelPolicy_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_AdminService_UpdateDefaultLabelPolicy_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_AdminService_GetDefaultLoginPolicy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -3500,6 +3632,10 @@ var (
|
||||
|
||||
pattern_AdminService_SearchIdps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"idps", "_search"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AdminService_GetDefaultLabelPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"policies", "label"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AdminService_UpdateDefaultLabelPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"policies", "label"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AdminService_GetDefaultLoginPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"policies", "login"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_AdminService_UpdateDefaultLoginPolicy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"policies", "login"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
@@ -3584,6 +3720,10 @@ var (
|
||||
|
||||
forward_AdminService_SearchIdps_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_GetDefaultLabelPolicy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_UpdateDefaultLabelPolicy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_GetDefaultLoginPolicy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_AdminService_UpdateDefaultLoginPolicy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
@@ -4209,6 +4209,259 @@ var _IdpSearchQuery_Key_NotInLookup = map[IdpSearchKey]struct{}{
|
||||
0: {},
|
||||
}
|
||||
|
||||
// Validate checks the field values on DefaultLabelPolicy with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *DefaultLabelPolicy) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// no validation rules for PrimaryColor
|
||||
|
||||
// no validation rules for SecondaryColor
|
||||
|
||||
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DefaultLabelPolicyValidationError{
|
||||
field: "CreationDate",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DefaultLabelPolicyValidationError{
|
||||
field: "ChangeDate",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultLabelPolicyValidationError is the validation error returned by
|
||||
// DefaultLabelPolicy.Validate if the designated constraints aren't met.
|
||||
type DefaultLabelPolicyValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e DefaultLabelPolicyValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e DefaultLabelPolicyValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e DefaultLabelPolicyValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e DefaultLabelPolicyValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e DefaultLabelPolicyValidationError) ErrorName() string {
|
||||
return "DefaultLabelPolicyValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e DefaultLabelPolicyValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sDefaultLabelPolicy.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = DefaultLabelPolicyValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = DefaultLabelPolicyValidationError{}
|
||||
|
||||
// Validate checks the field values on DefaultLabelPolicyUpdate with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *DefaultLabelPolicyUpdate) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// no validation rules for PrimaryColor
|
||||
|
||||
// no validation rules for SecondaryColor
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultLabelPolicyUpdateValidationError is the validation error returned by
|
||||
// DefaultLabelPolicyUpdate.Validate if the designated constraints aren't met.
|
||||
type DefaultLabelPolicyUpdateValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e DefaultLabelPolicyUpdateValidationError) ErrorName() string {
|
||||
return "DefaultLabelPolicyUpdateValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e DefaultLabelPolicyUpdateValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sDefaultLabelPolicyUpdate.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = DefaultLabelPolicyUpdateValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = DefaultLabelPolicyUpdateValidationError{}
|
||||
|
||||
// Validate checks the field values on DefaultLabelPolicyView with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
func (m *DefaultLabelPolicyView) Validate() error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// no validation rules for PrimaryColor
|
||||
|
||||
// no validation rules for SecondaryColor
|
||||
|
||||
if v, ok := interface{}(m.GetCreationDate()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DefaultLabelPolicyViewValidationError{
|
||||
field: "CreationDate",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if v, ok := interface{}(m.GetChangeDate()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DefaultLabelPolicyViewValidationError{
|
||||
field: "ChangeDate",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultLabelPolicyViewValidationError is the validation error returned by
|
||||
// DefaultLabelPolicyView.Validate if the designated constraints aren't met.
|
||||
type DefaultLabelPolicyViewValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e DefaultLabelPolicyViewValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e DefaultLabelPolicyViewValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e DefaultLabelPolicyViewValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e DefaultLabelPolicyViewValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e DefaultLabelPolicyViewValidationError) ErrorName() string {
|
||||
return "DefaultLabelPolicyViewValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e DefaultLabelPolicyViewValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sDefaultLabelPolicyView.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = DefaultLabelPolicyViewValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = DefaultLabelPolicyViewValidationError{}
|
||||
|
||||
// Validate checks the field values on DefaultLoginPolicy with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, an error is returned.
|
||||
|
||||
@@ -845,6 +845,58 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/policies/label": {
|
||||
"get": {
|
||||
"operationId": "AdminService_GetDefaultLabelPolicy",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1DefaultLabelPolicyView"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
},
|
||||
"put": {
|
||||
"operationId": "AdminService_UpdateDefaultLabelPolicy",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1DefaultLabelPolicy"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/v1DefaultLabelPolicyUpdate"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"AdminService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/policies/login": {
|
||||
"get": {
|
||||
"operationId": "AdminService_GetDefaultLoginPolicy",
|
||||
@@ -1412,6 +1464,55 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1DefaultLabelPolicy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primary_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"secondary_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1DefaultLabelPolicyUpdate": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primary_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"secondary_color": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1DefaultLabelPolicyView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"primary_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"secondary_color": {
|
||||
"type": "string"
|
||||
},
|
||||
"creation_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"change_date": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1DefaultLoginPolicy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -177,6 +177,26 @@ func (mr *MockAdminServiceClientMockRecorder) DeactivateIdpConfig(arg0, arg1 int
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeactivateIdpConfig", reflect.TypeOf((*MockAdminServiceClient)(nil).DeactivateIdpConfig), varargs...)
|
||||
}
|
||||
|
||||
// GetDefaultLabelPolicy mocks base method
|
||||
func (m *MockAdminServiceClient) GetDefaultLabelPolicy(arg0 context.Context, arg1 *emptypb.Empty, arg2 ...grpc.CallOption) (*admin.DefaultLabelPolicyView, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "GetDefaultLabelPolicy", varargs...)
|
||||
ret0, _ := ret[0].(*admin.DefaultLabelPolicyView)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// GetDefaultLabelPolicy indicates an expected call of GetDefaultLabelPolicy
|
||||
func (mr *MockAdminServiceClientMockRecorder) GetDefaultLabelPolicy(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDefaultLabelPolicy", reflect.TypeOf((*MockAdminServiceClient)(nil).GetDefaultLabelPolicy), varargs...)
|
||||
}
|
||||
|
||||
// GetDefaultLoginPolicy mocks base method
|
||||
func (m *MockAdminServiceClient) GetDefaultLoginPolicy(arg0 context.Context, arg1 *emptypb.Empty, arg2 ...grpc.CallOption) (*admin.DefaultLoginPolicyView, error) {
|
||||
m.ctrl.T.Helper()
|
||||
@@ -677,6 +697,26 @@ func (mr *MockAdminServiceClientMockRecorder) SetUpOrg(arg0, arg1 interface{}, a
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpOrg", reflect.TypeOf((*MockAdminServiceClient)(nil).SetUpOrg), varargs...)
|
||||
}
|
||||
|
||||
// UpdateDefaultLabelPolicy mocks base method
|
||||
func (m *MockAdminServiceClient) UpdateDefaultLabelPolicy(arg0 context.Context, arg1 *admin.DefaultLabelPolicyUpdate, arg2 ...grpc.CallOption) (*admin.DefaultLabelPolicy, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{arg0, arg1}
|
||||
for _, a := range arg2 {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "UpdateDefaultLabelPolicy", varargs...)
|
||||
ret0, _ := ret[0].(*admin.DefaultLabelPolicy)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// UpdateDefaultLabelPolicy indicates an expected call of UpdateDefaultLabelPolicy
|
||||
func (mr *MockAdminServiceClientMockRecorder) UpdateDefaultLabelPolicy(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{arg0, arg1}, arg2...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDefaultLabelPolicy", reflect.TypeOf((*MockAdminServiceClient)(nil).UpdateDefaultLabelPolicy), varargs...)
|
||||
}
|
||||
|
||||
// UpdateDefaultLoginPolicy mocks base method
|
||||
func (m *MockAdminServiceClient) UpdateDefaultLoginPolicy(arg0 context.Context, arg1 *admin.DefaultLoginPolicyRequest, arg2 ...grpc.CallOption) (*admin.DefaultLoginPolicy, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
||||
@@ -342,6 +342,27 @@ service AdminService {
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetDefaultLabelPolicy(google.protobuf.Empty) returns (DefaultLabelPolicyView) {
|
||||
option (google.api.http) = {
|
||||
get: "/policies/label"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "iam.policy.read"
|
||||
};
|
||||
}
|
||||
|
||||
rpc UpdateDefaultLabelPolicy(DefaultLabelPolicyUpdate) returns (DefaultLabelPolicy) {
|
||||
option (google.api.http) = {
|
||||
put: "/policies/label"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (caos.zitadel.utils.v1.auth_option) = {
|
||||
permission: "iam.policy.write"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetDefaultLoginPolicy(google.protobuf.Empty) returns (DefaultLoginPolicyView) {
|
||||
option (google.api.http) = {
|
||||
get: "/policies/login"
|
||||
@@ -903,6 +924,25 @@ enum IdpSearchKey {
|
||||
IDPSEARCHKEY_NAME = 2;
|
||||
}
|
||||
|
||||
message DefaultLabelPolicy {
|
||||
string primary_color = 1;
|
||||
string secondary_color = 2;
|
||||
google.protobuf.Timestamp creation_date = 3;
|
||||
google.protobuf.Timestamp change_date = 4;
|
||||
}
|
||||
|
||||
message DefaultLabelPolicyUpdate {
|
||||
string primary_color = 1;
|
||||
string secondary_color = 2;
|
||||
}
|
||||
|
||||
message DefaultLabelPolicyView {
|
||||
string primary_color = 1;
|
||||
string secondary_color = 2;
|
||||
google.protobuf.Timestamp creation_date = 3;
|
||||
google.protobuf.Timestamp change_date = 4;
|
||||
}
|
||||
|
||||
message DefaultLoginPolicy {
|
||||
bool allow_username_password = 1;
|
||||
bool allow_register = 2;
|
||||
|
||||
Reference in New Issue
Block a user