blob: e367c70d6931e6e0f26291c2ca6e6ba88e30186b [file] [log] [blame]
syntax = "proto3";
package bufman.dubbo.apache.org.registry.v1alpha1;
import "registry/v1alpha1/role.proto";
// DisplayService provides information regarding
// UI element displaying based on the users roles.
service DisplayService {
// DisplayOrganizationElements returns which organization elements should be displayed to the user.
rpc DisplayOrganizationElements(DisplayOrganizationElementsRequest) returns (DisplayOrganizationElementsResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// DisplayRepositoryElements returns which repository elements should be displayed to the user.
rpc DisplayRepositoryElements(DisplayRepositoryElementsRequest) returns (DisplayRepositoryElementsResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// DisplayUserElements returns which user elements should be displayed to the user.
rpc DisplayUserElements(DisplayUserElementsRequest) returns (DisplayUserElementsResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// DisplayServerElements returns which server elements should be displayed to the user.
rpc DisplayServerElements(DisplayServerElementsRequest) returns (DisplayServerElementsResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// DisplayOwnerEntitledElements returns which owner elements are entitled to be displayed to the user.
rpc DisplayOwnerEntitledElements(DisplayOwnerEntitledElementsRequest) returns (DisplayOwnerEntitledElementsResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// DisplayRepositoryEntitledElements returns which repository elements are entitled to be displayed to the user.
rpc DisplayRepositoryEntitledElements(DisplayRepositoryEntitledElementsRequest) returns (DisplayRepositoryEntitledElementsResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// ListManageableRepositoryRoles returns which roles should be displayed
// to the user when they are managing contributors on the repository.
rpc ListManageableRepositoryRoles(ListManageableRepositoryRolesRequest) returns (ListManageableRepositoryRolesResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
// ListManageableUserRepositoryRoles returns which roles should be displayed
// to the user when they are managing a specific contributor on the repository.
rpc ListManageableUserRepositoryRoles(ListManageableUserRepositoryRolesRequest) returns (ListManageableUserRepositoryRolesResponse) {
option idempotency_level = NO_SIDE_EFFECTS;
}
}
message DisplayOrganizationElementsRequest {
// The ID of the organization for which to check
// which elements should be displayed.
string organization_id = 1;
}
message DisplayOrganizationElementsResponse {
// Display create organization repository element if true.
bool create_repository = 1;
// Display create organization plugin element if true.
bool create_plugin = 2 [deprecated = true];
// Display create organization template element if true.
bool create_template = 3 [deprecated = true];
// Display organization settings element if true.
bool settings = 4;
// Display update organization settings element if true.
bool update_settings = 5;
// Display delete organization element if true.
bool delete = 6;
}
message DisplayRepositoryElementsRequest {
// The ID of the repository for which to check
// which elements should be displayed.
string repository_id = 1;
}
message DisplayRepositoryElementsResponse {
// Display repository settings element if true.
bool settings = 1;
// Display delete repository element if true.
bool delete = 2;
// Display write repository element if true.
bool write = 3;
}
message DisplayUserElementsRequest {}
message DisplayUserElementsResponse {
// Display delete user element if true.
bool delete = 1;
}
message DisplayServerElementsRequest {}
message DisplayServerElementsResponse {
// Display server admin panel element if true.
bool admin_panel = 1;
}
message DisplayOwnerEntitledElementsRequest {
// The name of the owner for which to check
// which elements are entitled to be displayed.
string owner_name = 1;
}
message DisplayOwnerEntitledElementsResponse {
// Display create private repository element if true.
bool create_private_repository = 1;
}
message DisplayRepositoryEntitledElementsRequest {
// The ID of the repository for which to check
// which elements are entitled to be displayed.
string repository_id = 1;
}
message DisplayRepositoryEntitledElementsResponse {
// Display repository change to private setting element if true.
bool set_private = 1;
}
message ListManageableRepositoryRolesRequest {
// The ID of the repository for which to check
// which roles should be displayed as manageable.
string repository_id = 1;
}
message ListManageableRepositoryRolesResponse {
// The list of roles that should be displayed
// to the user as manageable.
repeated RepositoryRole roles = 1;
}
message ListManageableUserRepositoryRolesRequest {
// The ID of the repository for which to check
// which roles should be displayed as manageable.
string repository_id = 1;
// The ID of the target user for which to check
// which roles are manageable.
string user_id = 2;
}
message ListManageableUserRepositoryRolesResponse {
// The list of roles that should be displayed
// to the user as manageable.
repeated RepositoryRole roles = 1;
}