OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import re | 5 import re |
6 | 6 |
7 AUTO_TAGGED_FIELDS = ( | 7 AUTO_TAGGED_FIELDS = ( |
8 'issue', | 8 'issue', |
9 'owner', | 9 'owner', |
10 'patchset', | 10 'patchset', |
(...skipping 17 matching lines...) Expand all Loading... |
28 RIETVELD_TIMESTAMP_FORMATS = ( | 28 RIETVELD_TIMESTAMP_FORMATS = ( |
29 '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M:%S.%f+00:00') | 29 '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M:%S.%f+00:00') |
30 STATS_START_TIMESTAMP = 374400 # 1970-01-05T00:00-0800 (midnight Monday PST) | 30 STATS_START_TIMESTAMP = 374400 # 1970-01-05T00:00-0800 (midnight Monday PST) |
31 TAG_START = 'action=patch_start' | 31 TAG_START = 'action=patch_start' |
32 TAG_STOP = 'action=patch_stop' | 32 TAG_STOP = 'action=patch_stop' |
33 TAG_PROJECT = 'project=%s' | 33 TAG_PROJECT = 'project=%s' |
34 TAG_ISSUE = 'issue=%s' | 34 TAG_ISSUE = 'issue=%s' |
35 TAG_PATCHSET = 'patchset=%s' | 35 TAG_PATCHSET = 'patchset=%s' |
36 TAG_CODEREVIEW_HOSTNAME = 'codereview_hostname=%s' | 36 TAG_CODEREVIEW_HOSTNAME = 'codereview_hostname=%s' |
37 TRYJOBVERIFIER = 'try job' | 37 TRYJOBVERIFIER = 'try job' |
38 VALID_EMAIL_RE = re.compile(r'^.*@(chromium\.org|google\.com)$') | 38 |
| 39 # Maps hosts -> operation -> (either 'everyone' or a regex on email). |
| 40 HOST_ACLS = { |
| 41 'chromium-cq-status.appspot.com': { |
| 42 'read': 'everyone', |
| 43 'write': re.compile(r'^.*@(chromium\.org|google\.com)$'), |
| 44 }, |
| 45 'internal-cq-status.appspot.com': { |
| 46 'read': re.compile(r'^.*@google\.com$'), |
| 47 'write': re.compile(r'^.*@google\.com$'), |
| 48 }, |
| 49 # Special case for development and default in tests. |
| 50 'Development': { |
| 51 'read': 'everyone', |
| 52 'write': re.compile(r'^.*@chromium\.org$'), |
| 53 }, |
| 54 } |
OLD | NEW |