test: Unit tests creating fake audit logs require create permission (#5455)

This commit is contained in:
Steven Masley 2022-12-19 14:02:52 -06:00 committed by GitHub
parent 1bc4eb5329
commit e3cf759968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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
}