| OLD | NEW |
| 1 # Copyright 2015 The LUCI Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """Contains functions to access configs. | 5 """Contains functions to access configs. |
| 6 | 6 |
| 7 Uses remote.Provider or fs.Provider to load configs, depending on whether config | 7 Uses remote.Provider or fs.Provider to load configs, depending on whether config |
| 8 service hostname is configured in common.ConfigSettings. | 8 service hostname is configured in common.ConfigSettings. |
| 9 See _get_config_provider_async(). | 9 See _get_config_provider_async(). |
| 10 | 10 |
| 11 Provider do not do type conversion, api.py does. | 11 Provider do not do type conversion, api.py does. |
| 12 """ | 12 """ |
| 13 | 13 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 """ | 297 """ |
| 298 cfg = yield get_project_config_async( | 298 cfg = yield get_project_config_async( |
| 299 project_id, 'project.cfg', project_config_pb2.ProjectCfg, | 299 project_id, 'project.cfg', project_config_pb2.ProjectCfg, |
| 300 store_last_good=True) | 300 store_last_good=True) |
| 301 raise ndb.Return(cfg and _has_access(cfg.access, identity)) | 301 raise ndb.Return(cfg and _has_access(cfg.access, identity)) |
| 302 | 302 |
| 303 | 303 |
| 304 def has_project_access(*args, **kwargs): | 304 def has_project_access(*args, **kwargs): |
| 305 """Blocking version of has_project_access_async.""" | 305 """Blocking version of has_project_access_async.""" |
| 306 return has_project_access_async(*args, **kwargs).get_result() | 306 return has_project_access_async(*args, **kwargs).get_result() |
| OLD | NEW |