Skip to content

Commit e3cf759

Browse files
authored
test: Unit tests creating fake audit logs require create permission (coder#5455)
1 parent 1bc4eb5 commit e3cf759

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/audit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (api *API) auditLogs(rw http.ResponseWriter, r *http.Request) {
7979

8080
func (api *API) generateFakeAuditLog(rw http.ResponseWriter, r *http.Request) {
8181
ctx := r.Context()
82-
if !api.Authorize(r, rbac.ActionRead, rbac.ResourceAuditLog) {
82+
if !api.Authorize(r, rbac.ActionCreate, rbac.ResourceAuditLog) {
8383
httpapi.Forbidden(rw)
8484
return
8585
}

0 commit comments

Comments
 (0)