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