Skip to content

Commit

Permalink
Proto updates related to user management (#3696)
Browse files Browse the repository at this point in the history
Signed-off-by: Radoslav Dimitrov <[email protected]>
  • Loading branch information
rdimitrov authored Jun 24, 2024
1 parent 85f3123 commit 19c0ea8
Show file tree
Hide file tree
Showing 7 changed files with 2,385 additions and 2,325 deletions.
2 changes: 1 addition & 1 deletion cmd/cli/app/project/role/role_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func UpdateCommand(ctx context.Context, cmd *cobra.Command, _ []string, conn *gr
Context: &minderv1.Context{
Project: &project,
},
Role: []string{r},
Roles: []string{r},
Subject: sub,
})
if err != nil {
Expand Down
8 changes: 6 additions & 2 deletions docs/docs/ref/proto.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/controlplane/handlers_authz.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,10 +606,10 @@ func (s *Server) removeRole(
// UpdateRole updates a role for a user on a project
func (s *Server) UpdateRole(ctx context.Context, req *minder.UpdateRoleRequest) (*minder.UpdateRoleResponse, error) {
// For the time being, ensure only one role is updated at a time
if len(req.GetRole()) != 1 {
if len(req.GetRoles()) != 1 {
return nil, util.UserVisibleError(codes.InvalidArgument, "only one role can be updated at a time")
}
role := req.GetRole()[0]
role := req.GetRoles()[0]
sub := req.GetSubject()

// Determine the target project.
Expand Down
46 changes: 25 additions & 21 deletions pkg/api/openapi/minder/v1/minder.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 19c0ea8

Please sign in to comment.