“Replaces repeated role checks with one numeric hierarchy. All documented actions pass.”
Routes are registered independently of the policy tables in authorizer.py: routes.py declares each route's action, and middleware.py passes it straight to authorize.
Review authorizer.py: flag the line where the refactor goes wrong, explain the failure, and fix it.