Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User roles added to proto #99

Merged
merged 2 commits into from
Aug 28, 2019
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
32 changes: 31 additions & 1 deletion authorize/grpcapi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ service Authorize {

rpc GetResourcesByType (GetResourcesByTypeInput) returns (GetResourcesByTypeOutput) {}

rpc GetActionsByUserRole (GetActionsByUserRoleInput) returns (GetActionsByUserRoleOutput) {}
rpc GetActionsByUserRole (GetActionsByUserRoleInput) returns (GetActionsByUserRoleOutput) {
option deprecated = true;
}
rpc GetResourcesAndActionsByUser (GetResourcesAndActionsByUserInput) returns (GetResourcesAndActionsByUserOutput) {}
rpc GetResourcesByOriginAndType (GetResourcesByOriginAndTypeInput) returns (GetResourcesByOriginAndTypeOutput) {}
rpc GetUserIDsWithAccessToResource (GetUserIDsWithAccessToResourceInput) returns (GetUserIDsWithAccessToResourceOutput) {}
Expand All @@ -33,15 +35,41 @@ service Authorize {
rpc RemoveResourceRelations (RemoveResourceRelationsInput) returns (common.Void) {}

rpc ApplyUserAction (ApplyUserActionInput) returns (common.Void) {}
rpc GetUserActions (GetUserActionsInput) returns (GetUserActionsOutput) {}
rpc RemoveUserAction (RemoveUserActionInput) returns (common.Void) {}

rpc AddUserRole (UserRole) returns (common.Void) {}
rpc GetUserRole (GetUserRoleInput) returns (UserRole) {}
rpc RemoveUserRole (RemoveUserRoleInput) returns (common.Void) {}

rpc AddAction (AddActionInput) returns (common.Void) {}
rpc RemoveAction (RemoveActionInput) returns (common.Void) {}
rpc GetAction (GetActionInput) returns (GetActionOutput) {}
rpc GetAllActions (common.Void) returns (GetAllActionsOutput) {}

}

message UserRole {
string name = 1;
repeated string actions = 2;
}

message GetUserActionsInput {
string user_id = 1;
}

message GetUserActionsOutput {
repeated Action actions = 1;
}

message GetUserRoleInput {
string role_name = 1;
}

message RemoveUserRoleInput {
string role_name = 1;
}

message IsAuthorizedInput {
string user_id = 1;
string action = 2;
Expand Down Expand Up @@ -165,10 +193,12 @@ message Action {
}

message GetActionsByUserRoleInput {
option deprecated = true;
string user_role = 1;
}

message GetActionsByUserRoleOutput {
option deprecated = true;
repeated Action actions = 1;
}

Expand Down