Skip to content

Commit

Permalink
fix(frontier): remove required checks from deprecated permission body…
Browse files Browse the repository at this point in the history
… fields

Signed-off-by: Kush <[email protected]>
  • Loading branch information
kushsharma committed Aug 10, 2023
1 parent e74d9b7 commit f74f53a
Showing 1 changed file with 5 additions and 7 deletions.
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

0 comments on commit f74f53a

Please sign in to comment.