Skip to content

Commit

Permalink
fix: return 403 when non-admin tries to do admin requests
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Aug 2, 2023
1 parent c5fbd6f commit 6dcb51b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/graph/pkg/middleware/requireadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func RequireAdmin(rm *roles.Manager, logger log.Logger) func(next http.Handler)
return
}

errorcode.AccessDenied.Render(w, r, http.StatusUnauthorized, "Unauthorized")
errorcode.AccessDenied.Render(w, r, http.StatusForbidden, "Forbidden")
})
}
}

0 comments on commit 6dcb51b

Please sign in to comment.