Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new astro cli commands to support RBAC in Orbit #214

Merged
merged 8 commits into from May 13, 2019

Conversation

andriisoldatenko
Copy link
Contributor

Fix #212

@andriisoldatenko andriisoldatenko changed the title Add fake astro workspace user list Add new astro cli commands to support RBAC in Orbit May 9, 2019
@andriisoldatenko andriisoldatenko marked this pull request as ready for review May 13, 2019 18:15
return nil
}
}
return errors.Errorf("please use one of: %s", strings.Join(validRoles, ", "))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schnie Please take a look on error message? sounds good?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me

@@ -80,6 +80,14 @@ var (
RunE: workspaceUserAdd,
}

workspaceUserUpdateCmd = &cobra.Command{
Use: "update user role",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

cmd/workspace.go Outdated
ws, err := coalesceWorkspace()
if err != nil {
return errors.Wrap(err, "failed to find a valid workspace")
// fmt.Println("Default workspace id not set, set default workspace id or pass a workspace in via the --workspace-id flag")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we delete this commented out line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

return nil
}
}
return errors.Errorf("please use one of: %s", strings.Join(validRoles, ", "))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me

@@ -80,6 +80,14 @@ var (
RunE: workspaceUserAdd,
}

workspaceUserUpdateCmd = &cobra.Command{
Use: "update user role",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

cmd/workspace.go Outdated
workspaceUserUpdateCmd = &cobra.Command{
Use: "update user role",
Short: "Update a user to a workspace",
Long: "Update a user to a workspace",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Update a user's role for a workspace"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

cmd/workspace.go Outdated
workspaceUserListCmd = &cobra.Command{
Use: "list",
Short: "Print list of user roles",
Long: "Print list of user roles",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "List users in a workspace"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@andriisoldatenko
Copy link
Contributor Author

go run main.go workspace user -h
Users can be added or removed from workspaces

Usage:
  astro workspace user [command]

Available Commands:
  add         Add a user to a workspace
  list        List users in a workspace
  remove      Remove a user from a workspace
  update      Update a user's role for a workspace

Flags:
  -h, --help   help for user

@schnie schnie merged commit 87c63c1 into master May 13, 2019
@schnie schnie deleted the new-commands-to-support-rbac branch May 13, 2019 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new astro cli commands to support RBAC in Orbit
2 participants