nordabiz/blueprints/audit
Maciej Pienczyn 4181a2e760 refactor: Migrate access control from is_admin to role-based system
Replace ~170 manual `if not current_user.is_admin` checks with:
- @role_required(SystemRole.ADMIN) for user management, security, ZOPK
- @role_required(SystemRole.OFFICE_MANAGER) for content management
- current_user.can_access_admin_panel() for admin UI access
- current_user.can_moderate_forum() for forum moderation
- current_user.can_edit_company(id) for company permissions

Add @office_manager_required decorator shortcut.
Add SQL migration to sync existing users' role field.

Role hierarchy: UNAFFILIATED(10) < MEMBER(20) < EMPLOYEE(30) < MANAGER(40) < OFFICE_MANAGER(50) < ADMIN(100)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:05:22 +01:00
..
__init__.py refactor: Move audit dashboard routes to blueprints/audit 2026-01-31 18:03:02 +01:00
CLAUDE.md refactor: Migrate access control from is_admin to role-based system 2026-02-01 21:05:22 +01:00
routes.py refactor: Migrate access control from is_admin to role-based system 2026-02-01 21:05:22 +01:00