| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package settings | 5 package settings |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "net/http" | 9 "net/http" |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 Message: fmt.Sprintf("Encountered error while ch
ecking %s:\n%s", entry, err), | 47 Message: fmt.Sprintf("Encountered error while ch
ecking %s:\n%s", entry, err), |
| 48 Code: http.StatusInternalServerError, | 48 Code: http.StatusInternalServerError, |
| 49 } | 49 } |
| 50 | 50 |
| 51 } else if ok { | 51 } else if ok { |
| 52 return true, nil | 52 return true, nil |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 return false, nil | 55 return false, nil |
| 56 } | 56 } |
| 57 |
| 58 // IsAllowedInternal is a shorthand for checking to see if the user is a reader |
| 59 // of a magic project named "buildbot-internal". |
| 60 func IsAllowedInternal(c context.Context) (bool, error) { |
| 61 return IsAllowed(c, "buildbot-internal") |
| 62 } |
| OLD | NEW |