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

Fixing usage strings for UAM commands. #266

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions pkg/user/admin/accept.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ type AcceptAdminWriter interface {

func AcceptCmd(generator func(logging.Logger, *acceptAdminConfig) (AcceptAdminWriter, error)) *cli.Command {
acceptCmd := &cli.Command{
Name: "accept-admin",
Usage: "user admin accept-admin --account-address <AccountAddress>",
UsageText: "Accepts a user to become admin who is currently pending admin acceptance.",
Description: `
Accepts a user to become admin who is currently pending admin acceptance.
`,
Name: "accept-admin",
Usage: "Accepts a user to become admin who is currently pending admin acceptance.",
Action: func(c *cli.Context) error {
return acceptAdmin(c, generator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/admin/add_pending.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ type AddPendingAdminWriter interface {

func AddPendingCmd(generator func(logging.Logger, *addPendingAdminConfig) (AddPendingAdminWriter, error)) *cli.Command {
addPendingCmd := &cli.Command{
Name: "add-pending-admin",
Usage: "user admin add-pending-admin --account-address <AccountAddress> --admin-address <AdminAddress>",
UsageText: "Add an admin to be pending until accepted.",
Description: `
Add an admin to be pending until accepted.
`,
Name: "add-pending-admin",
Usage: "Add an admin to be pending until accepted.",
Action: func(context *cli.Context) error {
return addPendingAdmin(context, generator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ import (

func AdminCmd(prompter utils.Prompter) *cli.Command {
adminCmd := &cli.Command{
Name: "admin",
Usage: "user admin <command>",
UsageText: "Manage admin users.",
Description: `
Manage admin users.
`,
Name: "admin",
Usage: "Manage admin users.",
After: telemetry.AfterRunAction(),
Flags: []cli.Flag{
&flags.VerboseFlag,
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/admin/is_admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@ type IsAdminReader interface {

func IsAdminCmd(readerGenerator func(logging.Logger, *isAdminConfig) (IsAdminReader, error)) *cli.Command {
cmd := &cli.Command{
Name: "is-admin",
Usage: "user admin is-admin --account-address <AccountAddress> --admin-address <AdminAddress>",
UsageText: "Checks if a user is an admin.",
Description: `
Checks if a user is an admin.
`,
Name: "is-admin",
Usage: "Checks if a user is an admin.",
Action: func(c *cli.Context) error {
return isAdmin(c, readerGenerator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/admin/is_pending.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ func IsPendingCmd(
readerGenerator func(logging.Logger, *isPendingAdminConfig) (IsPendingAdminReader, error),
) *cli.Command {
isPendingCmd := &cli.Command{
Name: "is-pending-admin",
Usage: "user admin is-pending-admin --account-address <AccountAddress> --pending-admin-address <PendingAdminAddress>",
UsageText: "Checks if a user is pending acceptance to admin.",
Description: `
Checks if a user is pending acceptance to admin.
`,
Name: "is-pending-admin",
Usage: "Checks if a user is pending acceptance to admin.",
Action: func(c *cli.Context) error {
return isPendingAdmin(c, readerGenerator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/admin/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,8 @@ type ListAdminsReader interface {

func ListCmd(readerGenerator func(logging.Logger, *listAdminsConfig) (ListAdminsReader, error)) *cli.Command {
listCmd := &cli.Command{
Name: "list-admins",
Usage: "user admin list-admins --account-address <AccountAddress>",
UsageText: "List all users who are admins.",
Description: `
List all users who are admins.
`,
Name: "list-admins",
Usage: "List all users who are admins.",
Action: func(c *cli.Context) error {
return listAdmins(c, readerGenerator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/admin/list_pending.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ func ListPendingCmd(
readerGenerator func(logging.Logger, *listPendingAdminsConfig) (ListPendingAdminsReader, error),
) *cli.Command {
listPendingCmd := &cli.Command{
Name: "list-pending-admins",
Usage: "user admin list-pending-admins --account-address <AccountAddress>",
UsageText: "List all users who are pending admin acceptance.",
Description: `
List all users who are pending admin acceptance.
`,
Name: "list-pending-admins",
Usage: "List all users who are pending admin acceptance.",
Action: func(c *cli.Context) error {
return listPendingAdmins(c, readerGenerator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/admin/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ type RemoveAdminWriter interface {

func RemoveCmd(generator func(logging.Logger, *removeAdminConfig) (RemoveAdminWriter, error)) *cli.Command {
removeCmd := &cli.Command{
Name: "remove-admin",
Usage: "user admin remove-admin --account-address <AccountAddress> --admin-address <AdminAddress>",
UsageText: "The remove command allows you to remove an admin user.",
Description: `
The remove command allows you to remove an admin user.
`,
Name: "remove-admin",
Usage: "The remove command allows you to remove an admin user.",
Action: func(context *cli.Context) error {
return removeAdmin(context, generator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/admin/remove_pending.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ func RemovePendingCmd(
generator func(logging.Logger, *removePendingAdminConfig) (RemovePendingAdminWriter, error),
) *cli.Command {
removeCmd := &cli.Command{
Name: "remove-pending-admin",
Usage: "user admin remove-pending-admin --account-address <AccountAddress> --admin-address <AdminAddress>",
UsageText: "Remove a user who is pending admin acceptance.",
Description: `
Remove a user who is pending admin acceptance.
`,
Name: "remove-pending-admin",
Usage: "Remove a user who is pending admin acceptance.",
Action: func(context *cli.Context) error {
return removePendingAdmin(context, generator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/appointee/appointee.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ import (

func AppointeeCmd(prompter utils.Prompter) *cli.Command {
appointeeCmd := &cli.Command{
Name: "appointee",
Usage: "user appointee <command>",
UsageText: "User permission management operations.",
Description: `
User permission management operations.
`,
Name: "appointee",
Usage: "User permission management operations.",
After: telemetry.AfterRunAction(),
Flags: []cli.Flag{
&flags.VerboseFlag,
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/appointee/can_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ type CanCallReader interface {

func canCallCmd(readerGenerator func(logging.Logger, *canCallConfig) (CanCallReader, error)) *cli.Command {
cmd := &cli.Command{
Name: "can-call",
Usage: "user appointee can-call --account-address <AccountsAddress> --appointee-address <AppointeeAddress> --target-address <TargetAddress> --selector <Selector>",
UsageText: "Checks if an appointee has a specific permission.",
Description: `
Checks if an appointee has a specific permission.
`,
Name: "can-call",
Usage: "Checks if an appointee has a specific permission.",
Action: func(c *cli.Context) error {
return canCall(c, readerGenerator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/appointee/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ type ListAppointeesReader interface {

func ListCmd(readerGenerator func(logging.Logger, *listAppointeesConfig) (ListAppointeesReader, error)) *cli.Command {
listCmd := &cli.Command{
Name: "list",
Usage: "user appointee list --account-address <AccountAddress> --target-address <TargetAddress> --selector <Selector>",
UsageText: "Lists all appointed addresses for an account with the provided permissions.",
Description: `
Lists all appointed addresses for an account with the provided permissions.
`,
Name: "list",
Usage: "Lists all appointed addresses for an account with the provided permissions.",
Action: func(c *cli.Context) error {
return listAppointees(c, readerGenerator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/appointee/list_permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ func ListPermissionsCmd(
readerGenerator func(logging.Logger, *listAppointeePermissionsConfig) (PermissionsReader, error),
) *cli.Command {
cmd := &cli.Command{
Name: "list-permissions",
Usage: "user appointee list-permissions --account-address <AccountAddress> --appointee-address <AppointeeAddress>",
UsageText: "List all permissions for a user.",
Description: `
List all permissions of a user.
`,
Name: "list-permissions",
Usage: "List all permissions of a user.",
Action: func(c *cli.Context) error {
return listPermissions(c, readerGenerator)
},
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/appointee/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ type RemoveAppointeePermissionWriter interface {

func RemoveCmd(generator func(logging.Logger, *removeConfig) (RemoveAppointeePermissionWriter, error)) *cli.Command {
removeCmd := &cli.Command{
Name: "remove",
Usage: "user appointee remove --account-address <AccountAddress> --appointee-address <AppointeeAddress> --target-address <TargetAddress> --selector <Selector>",
UsageText: "Remove an appointee's permission",
Description: `
Remove an appointee's permission'.
`,
Name: "remove",
Usage: "Remove an appointee's permission",
After: telemetry.AfterRunAction(),
Action: func(c *cli.Context) error {
return removeAppointeePermission(c, generator)
Expand Down
8 changes: 2 additions & 6 deletions pkg/user/appointee/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ type SetAppointeePermissionWriter interface {

func SetCmd(generator func(logging.Logger, *setConfig) (SetAppointeePermissionWriter, error)) *cli.Command {
setCmd := &cli.Command{
Name: "set",
Usage: "user appointee set --account-address <AccountAddress> --appointee-address <AppointeeAddress> --target-address <TargetAddress> --selector <Selector>",
UsageText: "Grant an appointee a permission.",
Description: `
Grant an appointee a permission.
`,
Name: "set",
Usage: "Grant an appointee a permission.",
Action: func(c *cli.Context) error {
return setAppointeePermission(c, generator)
},
Expand Down
Loading