~rogpeppe/juju-core/themue-058-debug-log-api

« back to all changes in this revision

Viewing changes to state/apiserver/common/interfaces.go

  • Committer: Frank Mueller
  • Date: 2014-01-23 14:14:49 UTC
  • mfrom: (2152.1.95 juju-core)
  • Revision ID: frank.mueller@canonical.com-20140123141449-b30l57y7gs3wjkpw
debugger: merged trunk and fixed permission and interface problems

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
                }, nil
67
67
        }
68
68
}
 
69
 
 
70
// AuthAlways returns an authentication function that always returns
 
71
// the given permission.
 
72
func AuthAlways(ok bool) GetAuthFunc {
 
73
        return func() (AuthFunc, error) {
 
74
                return func(tag string) bool {
 
75
                        return ok
 
76
                }, nil
 
77
        }
 
78
}