blob: 9702d16d83d09df83db3e9179d3046928cea3886 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001// 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.
4
5syntax = "proto3";
6
7package monorail.v3;
8
Adrià Vilanova Martínezac4a6442022-05-15 19:05:13 +02009option go_package = "infra/monorailv2/api/v3/api_proto";
Copybara854996b2021-09-07 19:36:02 +000010
11import "google/api/field_behavior.proto";
12import "api/v3/api_proto/permission_objects.proto";
13
14// ***DO NOT CALL rpcs IN THIS SERVICE.***
15// This service is for Monorail's frontend only.
16
17// Permissions service includes all methods needed for fetching permissions.
18service Permissions {
19 // status: DO NOT USE
20 // Returns the requester's permissions for the given resource.
21 //
22 // Raises:
23 // PERMISSION_DENIED if the given resource does not exist and/or the
24 // requester does not have permission to view the resource's name space.
25 // NOT_FOUND if the given resource does not exist.
26 rpc GetPermissionSet (GetPermissionSetRequest) returns (PermissionSet) {}
27
28 // status: DO NOT USE
29 // Returns the requester's permissions for all the given resources.
30 //
31 // Raises:
32 // PERMISSION_DENIED if any of the given resources do not exist and/or the
33 // requester does not have permission to view one of the resource's
34 // name space.
35 // NOT_FOUND if one of the given resources do not exist.
36 rpc BatchGetPermissionSets (BatchGetPermissionSetsRequest) returns (BatchGetPermissionSetsResponse) {}
37}
38
39
40// Request message for the GetPermissionSet emthod.
41// Next available tag: 2
42message GetPermissionSetRequest {
43 // The resource name of the resource permissions to retrieve.
44 string name = 1 [ (google.api.field_behavior) = REQUIRED ];
45}
46
47
48// Request message for the BatchGetPermissionSets method.
49// Next available tag: 2
50message BatchGetPermissionSetsRequest {
51 // The resource names of the resource permissions to retrieve.
52 repeated string names = 1 [ (google.api.field_behavior) = REQUIRED ];
53}
54
55
56// Response message for the BatchGetPermissionSets method.
57// Next available tag: 2
58message BatchGetPermissionSetsResponse {
59 // The Permissions, one for each of the given resources.
60 repeated PermissionSet permission_sets = 1;
61}