Authorize will return false if the user is not authorized to do the action. This function will log appropriately, but the caller must return an error to the api client. Eg: if !api.Authorize(...) { httpapi.Forbidden(rw) return }
(r *http.Request, action policy.Action, object rbac.Objecter)
| 54 | // return |
| 55 | // } |
| 56 | func (api *API) Authorize(r *http.Request, action policy.Action, object rbac.Objecter) bool { |
| 57 | return api.HTTPAuth.Authorize(r, action, object) |
| 58 | } |
| 59 | |
| 60 | // Authorize will return false if the user is not authorized to do the action. |
| 61 | // This function will log appropriately, but the caller must return an |
no test coverage detected