mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-05 05:42:16 +00:00
feat: fixes (#228)
* feat: user login names * fix: user login names * fix: generate login name
This commit is contained in:
@@ -3,7 +3,6 @@ package grpc
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
)
|
||||
|
||||
@@ -38,9 +37,6 @@ func (s *Server) UpdateApplication(ctx context.Context, in *ApplicationUpdate) (
|
||||
return appFromModel(app), nil
|
||||
}
|
||||
func (s *Server) DeactivateApplication(ctx context.Context, in *ApplicationID) (*Application, error) {
|
||||
if s.IsZitadel(ctx, in.ProjectId) {
|
||||
return nil, errors.ThrowInvalidArgument(nil, "GRPC-LSped", "Zitadel Project Applications should not be deactivated")
|
||||
}
|
||||
app, err := s.project.DeactivateApplication(ctx, in.ProjectId, in.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -56,17 +52,11 @@ func (s *Server) ReactivateApplication(ctx context.Context, in *ApplicationID) (
|
||||
}
|
||||
|
||||
func (s *Server) RemoveApplication(ctx context.Context, in *ApplicationID) (*empty.Empty, error) {
|
||||
if s.IsZitadel(ctx, in.ProjectId) {
|
||||
return nil, errors.ThrowInvalidArgument(nil, "GRPC-LSpee", "Zitadel Project Applications should not be removed")
|
||||
}
|
||||
err := s.project.RemoveApplication(ctx, in.ProjectId, in.Id)
|
||||
return &empty.Empty{}, err
|
||||
}
|
||||
|
||||
func (s *Server) UpdateApplicationOIDCConfig(ctx context.Context, in *OIDCConfigUpdate) (*OIDCConfig, error) {
|
||||
if s.IsZitadel(ctx, in.ProjectId) {
|
||||
return nil, errors.ThrowInvalidArgument(nil, "GRPC-LSpee", "Zitadel Project Applications OIdc Config should not be changed")
|
||||
}
|
||||
config, err := s.project.ChangeOIDCConfig(ctx, oidcConfigUpdateToModel(in))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -75,9 +65,6 @@ func (s *Server) UpdateApplicationOIDCConfig(ctx context.Context, in *OIDCConfig
|
||||
}
|
||||
|
||||
func (s *Server) RegenerateOIDCClientSecret(ctx context.Context, in *ApplicationID) (*ClientSecret, error) {
|
||||
if s.IsZitadel(ctx, in.ProjectId) {
|
||||
return nil, errors.ThrowInvalidArgument(nil, "GRPC-Lps4d", "Zitadel Project Applications OIdc Config should not be changed")
|
||||
}
|
||||
config, err := s.project.ChangeOIDConfigSecret(ctx, in.ProjectId, in.Id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user