Adrià Vilanova Martínez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame^] | 1 | // Copyright 2020 The Chromium Authors |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 4 | |
| 5 | // This file defines protobufs for features and related business |
| 6 | // objects, e.g., hotlists. |
| 7 | |
| 8 | syntax = "proto3"; |
| 9 | |
| 10 | package monorail.v3; |
| 11 | |
Adrià Vilanova Martínez | ac4a644 | 2022-05-15 19:05:13 +0200 | [diff] [blame] | 12 | option go_package = "infra/monorailv2/api/v3/api_proto"; |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 13 | |
| 14 | // All possible permissions on the Monorail site. |
| 15 | // Next available tag: 6 |
| 16 | enum Permission { |
| 17 | // Default value. This value is unused. |
| 18 | PERMISSION_UNSPECIFIED = 0; |
| 19 | // The permission needed to add and remove issues from a hotlist. |
| 20 | HOTLIST_EDIT = 1; |
| 21 | // The permission needed to delete a hotlist or change hotlist |
| 22 | // settings/members. |
| 23 | HOTLIST_ADMINISTER = 2; |
| 24 | // The permission needed to edit an issue. |
| 25 | ISSUE_EDIT = 3; |
| 26 | // The permission needed to edit a custom field definition. |
| 27 | FIELD_DEF_EDIT = 4; |
| 28 | // The permission needed to edit the value of a custom field. |
| 29 | // More permissions will be required in the specific issue |
| 30 | // where the user plans to edit that value, e.g. ISSUE_EDIT. |
| 31 | FIELD_DEF_VALUE_EDIT = 5; |
| 32 | } |
| 33 | |
| 34 | |
| 35 | // The set of a user's permissions for a single resource. |
| 36 | // Next available tag: 3 |
| 37 | message PermissionSet { |
| 38 | // The name of the resource `permissions` applies to. |
| 39 | string resource = 1; |
| 40 | // All the permissions a user has for `resource`. |
| 41 | repeated Permission permissions = 2; |
| 42 | } |