diff --git a/odpf/shield/v1beta1/shield.proto b/odpf/shield/v1beta1/shield.proto index 59e98c51..cf339a83 100644 --- a/odpf/shield/v1beta1/shield.proto +++ b/odpf/shield/v1beta1/shield.proto @@ -53,6 +53,16 @@ service ShieldService { }; } + rpc ListUserGroups(ListUserGroupsRequest) returns (ListUserGroupsResponse) { + option (google.api.http) = { + get: "/v1beta1/users/{id}/groups", + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + tags: "User"; + summary: "List Groups of a User"; + }; + } + rpc GetCurrentUser(GetCurrentUserRequest) returns (GetCurrentUserResponse) { option (google.api.http) = { get: "/v1beta1/users/self", @@ -659,6 +669,10 @@ message GetUserRequest { string id = 1; } +message ListUserGroupsRequest { + string id = 1; +} + message GetCurrentUserRequest { } @@ -681,6 +695,10 @@ message CreateGroupRequest { GroupRequestBody body = 1; } +message ListUserGroupsResponse { + repeated Group groups = 1; +} + message Group { string id = 1; string name = 2 [(validate.rules).string.pattern = "^[A-Za-z0-9_-]+$"];