fix(mobile-api): fail closed for admins outside the company model
An admin with no company who is not a super admin now gets 403 COMPANY_REQUIRED on every company-scoped request instead of seeing all companies. The module check and the email detail treat only a real super admin (no company and role 1) as super; a company user still holding role 1 gets only what their other roles grant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
7d29d89b3f
commit
998e04b844
12 files changed
+122
-10
No files matched your search
@@ -0,0 +1,10 @@
|
||||
## 1. Fail closed
|
||||
|
||||
- [x] 1.1 `AdminCompanyScope.scope` and `requireCompanyForCreate` refuse (403 `COMPANY_REQUIRED`) an admin with no company who is not a super admin
|
||||
- Depends on: none
|
||||
- Scope: `solvway-mobile-api/src/**/useraccess/AdminCompanyScope*.java`
|
||||
- Verify: `mvn -T 1C -q -pl solvway-mobile-api verify`
|
||||
- [x] 1.2 `AppAccessAspect` skips the module check only for `AdminCompanyScope.isSuper`; `AdminEmailService` uses the same test
|
||||
- Depends on: 1.1
|
||||
- Scope: `solvway-mobile-api/src/**/useraccess/AppAccessAspect*.java`, `solvway-mobile-api/src/**/service/AdminEmailService*.java`
|
||||
- Verify: `mvn -T 1C -q -pl solvway-mobile-api verify`
|
||||
Reference in new issue
Block a user