go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/buildbucket/proto/build_field_visibility.proto (about) 1 // Copyright 2022 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package buildbucket.v2; 18 19 option go_package = "go.chromium.org/luci/buildbucket/proto;buildbucketpb"; 20 21 import "google/protobuf/descriptor.proto"; 22 23 // Can be used to indicate that a buildbucket.v2.Build field should be visible 24 // to users with the specified permission. By default, buildbucket.builds.get 25 // is required to see fields, but this enum allows that access to be expanded. 26 // 27 // Note that we assume that users with GET_LIMITED also have LIST, and users 28 // with GET also have GET_LIMITED and LIST. 29 // 30 // IMPORTANT: this enum must be ordered such that permissions that grant more 31 // access (e.g. BUILDS_GET_PERMISSION) must always have lower enum numbers than 32 // permissions that grant less access (e.g. BUILDS_LIST_PERMISSION). 33 enum BuildFieldVisibility { 34 // No visibility specified. In this case the visibility defaults to 35 // requiring the buildbucket.builds.get permission. 36 FIELD_VISIBILITY_UNSPECIFIED = 0; 37 38 // Indicates the field will only be visible to users with the 39 // buildbucket.builds.get permission. 40 BUILDS_GET_PERMISSION = 1; 41 42 // Indicates the field will be visible to users with either the 43 // buildbucket.builds.getLimited or buildbucket.builds.get permission. 44 BUILDS_GET_LIMITED_PERMISSION = 2; 45 46 // Indicates the field will be visible to users with either the 47 // buildbucket.builds.list, buildbucket.builds.getLimited or 48 // buildbucket.builds.get permission. 49 BUILDS_LIST_PERMISSION = 3; 50 } 51 52 extend google.protobuf.FieldOptions { 53 // Can be used to indicate that a buildbucket.v2.Build field should be visible 54 // to users with the specified permission. By default, buildbucket.builds.get 55 // is required to see fields, but this annotation allows that access to be 56 // expanded. 57 // 58 // Note that we assume that users with GET_LIMITED also have LIST, and users 59 // with GET also have GET_LIMITED and LIST. 60 BuildFieldVisibility visible_with = 910567; 61 }