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

Rename RoleV3 to RoleV4 #7132

Merged
merged 1 commit into from
Jun 10, 2021
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
2 changes: 1 addition & 1 deletion api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ func (c *Client) GetRoles(ctx context.Context) ([]types.Role, error) {

// UpsertRole creates or updates role
func (c *Client) UpsertRole(ctx context.Context, role types.Role) error {
roleV3, ok := role.(*types.RoleV3)
roleV3, ok := role.(*types.RoleV4)
if !ok {
return trace.BadParameter("invalid type %T", role)
}
Expand Down
2 changes: 1 addition & 1 deletion api/client/doc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func ExampleClient_roleCRUD() {
defer clt.Close()

// Resource Spec structs reflect their Resource's yaml definition.
roleSpec := types.RoleSpecV3{
roleSpec := types.RoleSpecV4{
Options: types.RoleOptions{
MaxSessionTTL: types.Duration(time.Hour),
},
Expand Down
654 changes: 327 additions & 327 deletions api/client/proto/authservice.pb.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions api/client/proto/authservice.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ message Event {
// User is a user resource
types.UserV2 User = 8 [ (gogoproto.jsontag) = "user,omitempty" ];
// Role is a role resource
types.RoleV3 Role = 9 [ (gogoproto.jsontag) = "role,omitempty" ];
types.RoleV4 Role = 9 [ (gogoproto.jsontag) = "role,omitempty" ];
// Namespace is a namespace resource
types.Namespace Namespace = 10 [ (gogoproto.jsontag) = "namespace,omitempty" ];
// Server is a node or proxy resource
Expand Down Expand Up @@ -591,7 +591,7 @@ message GetRoleRequest {
// GetRolesResponse is a response to querying for all roles.
message GetRolesResponse {
// Roles is a list of roles.
repeated types.RoleV3 Roles = 1;
repeated types.RoleV4 Roles = 1;
}

// DeleteRoleRequest is a request to delete a role.
Expand Down Expand Up @@ -1021,11 +1021,11 @@ service AuthService {
rpc GenerateDatabaseCert(DatabaseCertRequest) returns (DatabaseCertResponse);

// GetRole retrieves a role described by the given request.
rpc GetRole(GetRoleRequest) returns (types.RoleV3);
rpc GetRole(GetRoleRequest) returns (types.RoleV4);
// GetRole retrieves all roles.
rpc GetRoles(google.protobuf.Empty) returns (GetRolesResponse);
// UpsertRole upserts a role in a backend.
rpc UpsertRole(types.RoleV3) returns (google.protobuf.Empty);
rpc UpsertRole(types.RoleV4) returns (google.protobuf.Empty);
// DeleteRole deletes an existing role in a backend described by the given request.
rpc DeleteRole(DeleteRoleRequest) returns (google.protobuf.Empty);

Expand Down
Loading