Skip to content

Commit

Permalink
NOISSUE - Fix return role on user creation (#2551)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Gateru <[email protected]>
  • Loading branch information
felixgateru authored Nov 26, 2024
1 parent 8d4e752 commit ba556e1
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/certs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func main() {
return
}
defer authnClient.Close()
logger.Info("AutN successfully connected to auth gRPC server " + authnClient.Secure())
logger.Info("AuthN successfully connected to auth gRPC server " + authnClient.Secure())

tp, err := jaegerclient.NewProvider(ctx, svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/journal/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func main() {
return
}
defer authnHandler.Close()
logger.Info("Authn successfully connected to auth gRPC server " + authnHandler.Secure())
logger.Info("AuthN successfully connected to auth gRPC server " + authnHandler.Secure())

authz, authzHandler, err := authsvcAuthz.NewAuthorization(ctx, authClientCfg)
if err != nil {
Expand All @@ -118,7 +118,7 @@ func main() {
return
}
defer authzHandler.Close()
logger.Info("Authz successfully connected to auth gRPC server " + authzHandler.Secure())
logger.Info("AuthZ successfully connected to auth gRPC server " + authzHandler.Secure())

tp, err := jaegerclient.NewProvider(ctx, svcName, cfg.JaegerURL, cfg.InstanceID, cfg.TraceRatio)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/postgres-reader/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func main() {
return
}
defer authzHandler.Close()
logger.Info("Authz successfully connected to auth gRPC server " + authzHandler.Secure())
logger.Info("AuthZ successfully connected to auth gRPC server " + authzHandler.Secure())

authn, authnHandler, err := authsvcAuthn.NewAuthentication(ctx, clientCfg)
if err != nil {
Expand All @@ -108,7 +108,7 @@ func main() {
return
}
defer authnHandler.Close()
logger.Info("Authn successfully connected to auth gRPC server " + authnHandler.Secure())
logger.Info("AuthN successfully connected to auth gRPC server " + authnHandler.Secure())

thingsClientCfg := grpcclient.Config{}
if err := env.ParseWithOptions(&thingsClientCfg, env.Options{Prefix: envPrefixThings}); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/things/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func main() {
exitCode = 1
return
}
logger.Info("Policy Evaluator and Policy manager are successfully connected to SpiceDB gRPC server")
logger.Info("Policy evaluator and Policy manager are successfully connected to SpiceDB gRPC server")

grpcCfg := grpcclient.Config{}
if err := env.ParseWithOptions(&grpcCfg, env.Options{Prefix: envPrefixAuth}); err != nil {
Expand Down
6 changes: 3 additions & 3 deletions cmd/timescale-reader/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func main() {
return
}
defer authzHandler.Close()
logger.Info("Authz successfully connected to auth gRPC server " + authzHandler.Secure())
logger.Info("AuthZ successfully connected to auth gRPC server " + authzHandler.Secure())

authn, authnHandler, err := authsvcAuthn.NewAuthentication(ctx, clientCfg)
if err != nil {
Expand All @@ -108,7 +108,7 @@ func main() {
return
}
defer authnHandler.Close()
logger.Info("Authn successfully connected to auth gRPC server " + authnHandler.Secure())
logger.Info("AuthN successfully connected to auth gRPC server " + authnHandler.Secure())

thingsClientCfg := grpcclient.Config{}
if err := env.ParseWithOptions(&thingsClientCfg, env.Options{Prefix: envPrefixThings}); err != nil {
Expand All @@ -125,7 +125,7 @@ func main() {
}
defer thingsHandler.Close()

logger.Info("ThingsService gRPC client successfully connected to things gRPC server " + thingsHandler.Secure())
logger.Info("Things service gRPC client successfully connected to things gRPC server " + thingsHandler.Secure())

httpServerConfig := server.Config{Port: defSvcHTTPPort}
if err := env.ParseWithOptions(&httpServerConfig, env.Options{Prefix: envPrefixHTTP}); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions cmd/users/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func main() {
return
}
defer authnHandler.Close()
logger.Info("Authn successfully connected to auth gRPC server " + authnHandler.Secure())
logger.Info("AuthN successfully connected to auth gRPC server " + authnHandler.Secure())

authz, authzHandler, err := authsvcAuthz.NewAuthorization(ctx, clientConfig)
if err != nil {
Expand All @@ -194,7 +194,7 @@ func main() {
return
}
defer authzHandler.Close()
logger.Info("Authz successfully connected to auth gRPC server " + authzHandler.Secure())
logger.Info("AuthZ successfully connected to auth gRPC server " + authzHandler.Secure())

domainsClient, domainsHandler, err := grpcclient.SetupDomainsClient(ctx, clientConfig)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/groups/middleware/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ func (lm *loggingMiddleware) Unassign(ctx context.Context, session authn.Session
}
if err != nil {
args = append(args, slog.Any("error", err))
lm.logger.Warn("Unassign member to group failed", args...)
lm.logger.Warn("Unassign member from group failed", args...)
return
}
lm.logger.Info("Unassign member to group completed successfully", args...)
lm.logger.Info("Unassign member from group completed successfully", args...)
}(time.Now())

return lm.svc.Unassign(ctx, session, groupID, relation, memberKind, memberIDs...)
Expand Down
2 changes: 1 addition & 1 deletion users/postgres/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewRepository(db postgres.Database) users.Repository {
func (repo *userRepo) Save(ctx context.Context, c users.User) (users.User, error) {
q := `INSERT INTO users (id, tags, email, secret, metadata, created_at, status, role, first_name, last_name, username, profile_picture)
VALUES (:id, :tags, :email, :secret, :metadata, :created_at, :status, :role, :first_name, :last_name, :username, :profile_picture)
RETURNING id, tags, email, metadata, created_at, status, first_name, last_name, username, profile_picture`
RETURNING id, tags, email, metadata, created_at, status, role, first_name, last_name, username, profile_picture`

dbu, err := toDBUser(c)
if err != nil {
Expand Down

0 comments on commit ba556e1

Please sign in to comment.