mirror of https://github.com/coder/coder.git
test: Unit tests creating fake audit logs require create permission (#5455)
This commit is contained in:
parent
1bc4eb5329
commit
e3cf759968
|
@ -79,7 +79,7 @@ func (api *API) auditLogs(rw http.ResponseWriter, r *http.Request) {
|
|||
|
||||
func (api *API) generateFakeAuditLog(rw http.ResponseWriter, r *http.Request) {
|
||||
ctx := r.Context()
|
||||
if !api.Authorize(r, rbac.ActionRead, rbac.ResourceAuditLog) {
|
||||
if !api.Authorize(r, rbac.ActionCreate, rbac.ResourceAuditLog) {
|
||||
httpapi.Forbidden(rw)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue