Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: logdog/appengine/coordinator/auth.go

Issue 2575383002: Add server/cache support to gaeconfig. (Closed)
Patch Set: Un-collapse. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dm/appengine/distributor/registry.go ('k') | logdog/appengine/coordinator/config/config.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/appengine/coordinator/auth.go
diff --git a/logdog/appengine/coordinator/auth.go b/logdog/appengine/coordinator/auth.go
index 1044c23b64e67d3c78b104e2d37cc38703570e7a..13f8990ba011db3a5ffd3b7e17234ab7e8973885 100644
--- a/logdog/appengine/coordinator/auth.go
+++ b/logdog/appengine/coordinator/auth.go
@@ -71,18 +71,16 @@ func checkMember(c context.Context, groups ...string) error {
}
id := auth.CurrentIdentity(c)
- for _, group := range groups {
- is, err := auth.IsMember(c, group)
- if err != nil {
- return err
- }
- if is {
- log.Fields{
- "identity": id,
- "group": group,
- }.Debugf(c, "User access granted.")
- return nil
- }
+ is, err := auth.IsMember(c, groups...)
+ if err != nil {
+ return err
+ }
+ if is {
+ log.Fields{
+ "identity": id,
+ "group": groups,
+ }.Debugf(c, "User access granted.")
+ return nil
}
return &MembershipError{
« no previous file with comments | « dm/appengine/distributor/registry.go ('k') | logdog/appengine/coordinator/config/config.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698