Adrià Vilanova MartÃnez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame] | 1 | # Copyright 2016 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 | """Protocol buffers for Monorail site-wide features.""" |
| 6 | |
| 7 | from __future__ import print_function |
| 8 | from __future__ import division |
| 9 | from __future__ import absolute_import |
| 10 | |
| 11 | from protorpc import messages |
| 12 | |
| 13 | |
| 14 | class UserTypeRestriction(messages.Enum): |
| 15 | """An enum for site-wide settings about who can take an action.""" |
| 16 | # Anyone may do it. |
| 17 | ANYONE = 1 |
| 18 | |
| 19 | # Only domain admins may do it. |
| 20 | ADMIN_ONLY = 2 |
| 21 | |
| 22 | # No one may do it, the feature is basically disabled. |
| 23 | NO_ONE = 3 |
| 24 | |
| 25 | # TODO(jrobbins): implement same-domain users |