AllowedWithAuth returns whether the given request has access to perform all the operations in op against am.
(am AuthMode, req *http.Request, op Operation)
| 340 | // has access to perform all the operations in op |
| 341 | // against am. |
| 342 | func AllowedWithAuth(am AuthMode, req *http.Request, op Operation) bool { |
| 343 | if op&OpUpload != 0 { |
| 344 | // upload (at least from pk-put) requires stat and get too |
| 345 | op = op | OpVivify |
| 346 | } |
| 347 | return am.AllowedAccess(req)&op == op |
| 348 | } |
| 349 | |
| 350 | // Allowed returns whether the given request |
| 351 | // has access to perform all the operations in op. |
no test coverage detected