Skip to content

Commit

Permalink
merge: Merge pull request #67 from ArunaStorage/update-user-handling-2
Browse files Browse the repository at this point in the history
[1.0.0-rc.15] Update user handling
  • Loading branch information
St4NNi authored Apr 6, 2023
2 parents b774feb + 827c407 commit cc4f63f
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 2 deletions.
2 changes: 2 additions & 0 deletions aruna/api/storage/models/v1/auth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ message User {
bool is_admin = 5;
// Is service account
bool is_service_account = 6;
// User email (empty if service account)
string email = 7;
}

enum Permission {
Expand Down
30 changes: 29 additions & 1 deletion aruna/api/storage/services/v1/project_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,20 @@ service ProjectService {
};
}


// GetAllUserPermissionsForProject
//
// Status: ALPHA
//
// Get the user_permission of a specific user for the project.
rpc GetAllUserPermissionsForProject(GetAllUserPermissionsForProjectRequest)
returns (GetAllUserPermissionsForProjectResponse) {
option (google.api.http) = {
get : "/v1/project/{project_id}/get_users"
};
}


// EditUserPermissionsForProject
//
// Status: STABLE
Expand Down Expand Up @@ -241,4 +255,18 @@ message EditUserPermissionsForProjectRequest {
storage.models.v1.ProjectPermission user_permission = 2;
}

message EditUserPermissionsForProjectResponse {}
message EditUserPermissionsForProjectResponse {}

message UserWithProjectPermissions {
storage.models.v1.User user = 1;
storage.models.v1.ProjectPermission user_permissions = 2;
}

message GetAllUserPermissionsForProjectRequest {
// Project id
string project_id = 1;
}

message GetAllUserPermissionsForProjectResponse {
repeated UserWithProjectPermissions users = 1;
}
26 changes: 25 additions & 1 deletion aruna/api/storage/services/v1/user_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ service UserService {
};
}

// UpdateUserDisplayName
//
// Status: ALPHA
//
// Updates the email for the user (Personal only)
rpc UpdateUserEmail(UpdateUserEmailRequest)
returns (UpdateUserEmailResponse) {
option (google.api.http) = {
patch : "/v1/user/email"
body : "*"
};
}

// GetUserProjects
//
// Status: STABLE
Expand Down Expand Up @@ -332,4 +345,15 @@ message DeactivateUserRequest {
string user_id = 1;
}

message DeactivateUserResponse {}
message DeactivateUserResponse {}


message UpdateUserEmailRequest {
string user_id = 1;
// If new email is empty == unsubscribe
string new_email = 2;
}

message UpdateUserEmailResponse {
storage.models.v1.User user = 1;
}

0 comments on commit cc4f63f

Please sign in to comment.