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

[1.0.0-rc.15] Update user handling #67

Merged
merged 3 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
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}/users"
St4NNi marked this conversation as resolved.
Show resolved Hide resolved
};
}


// 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;
}