Commit Graph

4 Commits

Author SHA1 Message Date
7f467600e9 feat(auth): enforce strict branch scoping for branch-assigned HR and staff accounts
- Introduce authBranchId() helper to resolve assigned branch while allowing company admin/superadmin cross-branch oversight
- Restrict branch, department, and employee listings and mutations to assigned branch for branch-scoped accounts
- Scope attendance records, biometric logs, leave applications/balances, payslips, shifts, and announcements by assigned branch
- Add comprehensive automated feature tests in BranchScopedAccessTest to prevent branch cross-visibility regression
2026-09-10 11:14:24 +08:00
8f078c1f33 Implement HR Branch isolation and Shift isolation 2026-07-14 11:41:04 +08:00
50ad5f45eb fix: resolve permission/role cache not reflecting issues
- UserController: use Spatie syncRoles([$role]) instead of direct Eloquent relations relation sync() which bypassed Spatie model events and cache observers
- RoleController: explicitly call forgetCachedPermissions() on store and update to force cache refresh
- Clear application cache
2026-06-30 16:44:13 +08:00
273c8e8153 initial commit 2026-04-13 08:16:56 +08:00