Skip to content

Commit

Permalink
🔄 Synced file(s) with polarsignals/polarsignals
Browse files Browse the repository at this point in the history
  • Loading branch information
manojVivek committed Apr 25, 2024
1 parent 2c588b6 commit d8295e2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
21 changes: 21 additions & 0 deletions polarsignals/organization/v1alpha1/organization.proto
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ service OrganizationService {
option (google.api.http) = {get: "/v1/sso-login-url/{organization_identifier}"};
}

// UpdateUserRole updates the role of the user with the given id for the given organization_id.
rpc UpdateUserRole(UpdateUserRoleRequest) returns (UpdateUserRoleResponse) {
option (google.api.http) = {
post: "/v1/{organization_id}/users/{user_id}/role"
body: "*"
};
}

}

// Organization represents an organization.
Expand Down Expand Up @@ -350,3 +358,16 @@ message GetSSOConnectorIdResponse {
// The Connector Id.
string connector_id = 1;
}

// UpdateUserRoleRequest is the request for the UpdateUserRole method.
message UpdateUserRoleRequest {
// The ID of the organization.
string organization_id = 1;
// The ID of the user.
string user_id = 2;
// The role of the user.
string role = 3;
}

// UpdateUserRoleResponse is the response for the UpdateUserRole method.
message UpdateUserRoleResponse {}
12 changes: 11 additions & 1 deletion polarsignals/user/v1alpha1/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ service UserService {
}
}

// UserOrganizationRole represents the role of a user in an organization.
message UserOrganizationRole {
// The unique identifier of the organization.
string organization_id = 1;
// The role of the user in the organization.
string role = 2;
}

// User represents a user.
message User {
// The unique identifier of the user.
Expand All @@ -57,6 +65,8 @@ message User {
string auth_provider = 8;
// the product tours completed for the user.
repeated string product_tours = 9;
// the user's roles.
repeated UserOrganizationRole roles = 10;
}

// GetSelfRequest is the request for the GetSelf method.
Expand Down Expand Up @@ -107,4 +117,4 @@ message UpdateUserProductToursRequest {
}

// UpdateUserProductToursResponse is the response for the UpdateUserProductTours method.
message UpdateUserProductToursResponse {}
message UpdateUserProductToursResponse {}

0 comments on commit d8295e2

Please sign in to comment.