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

fix(frontier): remove required checks from deprecated permission body fields #296

Merged
merged 1 commit into from
Aug 10, 2023
Merged
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
12 changes: 5 additions & 7 deletions raystack/frontier/v1beta1/admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -355,22 +355,20 @@ message DeleteRoleResponse {}
message PermissionRequestBody {
string name = 1 [
deprecated = true,
(validate.rules).string = {
min_len: 3,
pattern: "^[A-Za-z0-9]+$"
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The name of the permission. It should be unique across a Frontier instance and can contain only alphanumeric characters."}
];
// namespace should be in service/resource format
string namespace = 2 [
deprecated = true,
(validate.rules).string.min_len = 3,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The namespace of the permission.The namespace should be in service/resource format.<br/>*Example:*`app/guardian`"}
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The namespace of the permission. The namespace should be in service/resource format.<br/>*Example:*`compute/guardian`"}
];
google.protobuf.Struct metadata = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The metadata object for permissions that can hold key value pairs."}];
string title = 4 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The title can contain any UTF-8 character, used to provide a human-readable name for the permissions. Can also be left empty."}];

// key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'.
// Use this instead of using name and namespace fields
string key = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'.",
description: "Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'. Namespace name cannot be `app` as it's reserved for core permissions.",
example: "\"compute.instance.get\""
}];
}
Expand Down
Loading