# Sprint 4 Report

## Implemented

- company model and migration;
- branch model, status, migration, and administration interface;
- system and custom role model;
- permission catalogue and permission model;
- account-role and account-branch pivots;
- all-branch access flag;
- permission middleware;
- branch access service;
- staff account creation;
- encrypted optional staff email;
- generated access keys;
- role and branch assignment;
- staff suspension with session revocation;
- active-session administration;
- append-only audit-log foundation;
- scalable indexes and cursor pagination;
- route and unit tests;
- feature documentation.

## Deferred

- initial system-role and permission records in the final SQL installer;
- company onboarding wizard;
- department hierarchy;
- full role-editing interface;
- access-key reveal and regeneration controls;
- audit-log search interface;
- staff reactivation and permanent revocation screens.

These are completed in later approved sprints without changing the underlying
models introduced here.
