(pred string, groups []string, operation *acl.Operation)
| 184 | } |
| 185 | |
| 186 | func hasAccessToPred(pred string, groups []string, operation *acl.Operation) bool { |
| 187 | AclCachePtr.RLock() |
| 188 | defer AclCachePtr.RUnlock() |
| 189 | predPerms := AclCachePtr.predPerms |
| 190 | |
| 191 | if groupPerms, found := predPerms[pred]; found { |
| 192 | if hasRequiredAccess(groupPerms, groups, operation) { |
| 193 | return true |
| 194 | } |
| 195 | } |
| 196 | return false |
| 197 | } |
| 198 | |
| 199 | // hasRequiredAccess checks if any group in the passed in groups is allowed to perform the operation |
| 200 | // according to the acl rules stored in groupPerms |
no test coverage detected