Skip to content

Commit dec3dbe

Browse files
authored
fix(frontier): move list policies out of admin service (#325)
Signed-off-by: Kush Sharma <[email protected]>
1 parent ec5b658 commit dec3dbe

File tree

2 files changed

+21
-22
lines changed

2 files changed

+21
-22
lines changed

raystack/frontier/v1beta1/admin.proto

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,6 @@ service AdminService {
183183
};
184184
}
185185

186-
// Policies
187-
rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse) {
188-
option (google.api.http) = {get: "/v1beta1/policies"};
189-
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
190-
tags: "Policy";
191-
summary: "List all policies";
192-
description: "Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.";
193-
};
194-
}
195-
196186
// Roles
197187
rpc CreateRole(CreateRoleRequest) returns (CreateRoleResponse) {
198188
option (google.api.http) = {
@@ -382,18 +372,6 @@ message ListResourcesResponse {
382372
repeated Resource resources = 1;
383373
}
384374

385-
message ListPoliciesRequest {
386-
string org_id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The organization id to filter by."}];
387-
string project_id = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The project id to filter by."}];
388-
string user_id = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The user id to filter by."}];
389-
string role_id = 4 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The role id to filter by."}];
390-
string group_id = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The group id to filter by."}];
391-
}
392-
393-
message ListPoliciesResponse {
394-
repeated Policy policies = 1;
395-
}
396-
397375
message CreateRoleRequest {
398376
RoleRequestBody body = 1;
399377
}

raystack/frontier/v1beta1/frontier.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,15 @@ service FrontierService {
930930
};
931931
}
932932

933+
rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse) {
934+
option (google.api.http) = {get: "/v1beta1/policies"};
935+
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
936+
tags: "Policy";
937+
summary: "List all policies";
938+
description: "Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.";
939+
};
940+
}
941+
933942
rpc UpdatePolicy(UpdatePolicyRequest) returns (UpdatePolicyResponse) {
934943
option (google.api.http) = {
935944
put: "/v1beta1/policies/{id}",
@@ -2857,6 +2866,18 @@ message GetPolicyResponse {
28572866
Policy policy = 1;
28582867
}
28592868

2869+
message ListPoliciesRequest {
2870+
string org_id = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The organization id to filter by."}];
2871+
string project_id = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The project id to filter by."}];
2872+
string user_id = 3 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The user id to filter by."}];
2873+
string role_id = 4 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The role id to filter by."}];
2874+
string group_id = 5 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The group id to filter by."}];
2875+
}
2876+
2877+
message ListPoliciesResponse {
2878+
repeated Policy policies = 1;
2879+
}
2880+
28602881
message UpdatePolicyRequest {
28612882
string id = 1;
28622883
PolicyRequestBody body = 2;

0 commit comments

Comments
 (0)