CS-472 Failed to mark video as completed
Merged
GI
4mo ago+421+421+012345678901234567890123456789-17-17-01234567890123456789
This is an automated pull request to merge chas/mark-video-as-custom-role into dev.
It was created by the [Auto Pull Request] action.
Summary by cubic
Enabling the Employee Compliance obligation now auto-adds portal:read/update in both the app and API, fixing CS-472 where users couldn’t mark training videos as completed. Applies to new roles and updates, including roles created via API or outside the UI.
- Bug Fixes
- API: enforce compliance →
portalon create/update (covers obligations-only and permissions-only), validate privilege escalation against the final merged permissions, avoid dup actions, and never auto-strip explicitportalwhen compliance is off. - App: sync the “Employee Compliance” toggle with
portalinPermissionMatrix; disabling it removesportal, and unrelated permission edits don’t touch obligations. - Tests: coverage for no
portalwithout compliance, dedupedportal, obligations/permissions merges (incl. no-op updates), and privilege-escalation rejections.
- API: enforce compliance →