Skip to content

Commit

Permalink
feat(shield): add api to list groups of a user (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbh authored Feb 14, 2022
1 parent d08a491 commit 32ab3c3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions odpf/shield/v1beta1/shield.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -659,6 +669,10 @@ message GetUserRequest {
string id = 1;
}

message ListUserGroupsRequest {
string id = 1;
}

message GetCurrentUserRequest {
}

Expand All @@ -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_-]+$"];
Expand Down

0 comments on commit 32ab3c3

Please sign in to comment.