Skip to content

Commit

Permalink
fix!: use lowercase values for registry roles (#1414)
Browse files Browse the repository at this point in the history
  • Loading branch information
Enda authored Feb 2, 2022
1 parent 5ad1ec5 commit 585575d
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/commands/rhoas_cluster_connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ After running this command, you need to grant access for the service account tha

For the Service Registry application service, enter this command:

$ rhoas service-registry role add --role=Manager --service-account your-sa
$ rhoas service-registry role add --role=manager --service-account your-sa


```
Expand Down
8 changes: 4 additions & 4 deletions docs/commands/rhoas_service-registry_role.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Service Registry role management

Manage Service Registry roles using a set of commands that give users one of following permissions:

* Viewer (provides read access)
* Manager (provides read and write access)
* Admin (enables admin along with read and write access)
* viewer (provides read access)
* manager (provides read and write access)
* admin (enables admin along with read and write access)

Roles can be applied to users (for example, "martin_redhat") and Service Account Client IDs (for example, "srvc-acct-03ddedba-5b49-4aa0-9b68-02e8b8c31add").
These commands are accessible only to users with the organization admin role or owners of the Service Registry instance.
Expand All @@ -19,7 +19,7 @@ These commands are accessible only to users with the organization admin role or

```
## Create or update user role
rhoas service-registry role add --role=Admin --username=joedough
rhoas service-registry role add --role=admin --username=joedough
## List user and service account roles
rhoas service-registry role list
Expand Down
2 changes: 1 addition & 1 deletion docs/commands/rhoas_service-registry_role_add.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rhoas service-registry role add [flags]

```
## Create or update user role
rhoas service-registry role add --role=Admin --username=joedough
rhoas service-registry role add --role=admin --username=joedough
```

Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/registry/artifact/util/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ var AllowedArtifactStateEnumValues = []string{
}

const (
ViewerRole = "Viewer"
ManagerRole = "Manager"
AdminRole = "Admin"
ViewerRole = "viewer"
ManagerRole = "manager"
AdminRole = "admin"
)

var AllowedRoleTypeEnumValues = []string{
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/localize/locales/en/cmd/cluster.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ After running this command, you need to grant access for the service account tha
For the Service Registry application service, enter this command:
$ rhoas service-registry role add --role=Manager --service-account your-sa
$ rhoas service-registry role add --role=manager --service-account your-sa
'''

[cluster.connect.cmd.example]
Expand Down Expand Up @@ -303,7 +303,7 @@ You need to separately grant service account access to Kafka by issuing followin
one = '''
You need to assign one of the roles for the service account in order to use it with service registry. For example:
$ rhoas service-registry role add --role=Manager --service-account {{.ClientID}}
$ rhoas service-registry role add --role=manager --service-account {{.ClientID}}
'''

[cluster.kubernetes.createTokenSecret.log.info.createFailed]
Expand Down
10 changes: 5 additions & 5 deletions pkg/core/localize/locales/en/cmd/role.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ one = '''
Manage Service Registry roles using a set of commands that give users one of following permissions:
* Viewer (provides read access)
* Manager (provides read and write access)
* Admin (enables admin along with read and write access)
* viewer (provides read access)
* manager (provides read and write access)
* admin (enables admin along with read and write access)
Roles can be applied to users (for example, "martin_redhat") and Service Account Client IDs (for example, "srvc-acct-03ddedba-5b49-4aa0-9b68-02e8b8c31add").
These commands are accessible only to users with the organization admin role or owners of the Service Registry instance.
Expand All @@ -17,7 +17,7 @@ These commands are accessible only to users with the organization admin role or
[registry.role.cmd.example]
one = '''
## Create or update user role
rhoas service-registry role add --role=Admin --username=joedough
rhoas service-registry role add --role=admin --username=joedough
## List user and service account roles
rhoas service-registry role list
Expand All @@ -36,7 +36,7 @@ one = 'Add or update role for user or service account'
[registry.role.cmd.add.example]
one = '''
## Create or update user role
rhoas service-registry role add --role=Admin --username=joedough
rhoas service-registry role add --role=admin --username=joedough
'''

[artifact.cmd.common.error.useSaOrUserOnly]
Expand Down
2 changes: 1 addition & 1 deletion pkg/core/localize/locales/en/cmd/serviceaccount.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ To grant full access to produce and consume Kafka messages, enter this command:
To grant read and write access to the currently selected Service Registry instance, enter this command:
$ rhoas service-registry role add --role Manager --service-account {{.ClientID}}
$ rhoas service-registry role add --role manager --service-account {{.ClientID}}
'''

Expand Down

0 comments on commit 585575d

Please sign in to comment.