Skip to content
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
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