zoneminder/web/api/app/Controller
Isaac Connor 4e60cb96a7 feat: add User Roles feature for reusable permission templates
Add a User Roles system where roles define reusable permission templates.
When a user has a role assigned, the role provides fallback permissions
(user's direct permissions take precedence; role is used when user has 'None').

Database changes:
- Add User_Roles table with same permission fields as Users
- Add Role_Groups_Permissions table for per-role group overrides
- Add Role_Monitors_Permissions table for per-role monitor overrides
- Add RoleId foreign key to Users table

Permission resolution order:
1. User's direct Monitor/Group permissions (if not 'Inherit')
2. Role's Monitor/Group permissions (if user has role)
3. Role's base permission (if user's is 'None')
4. User's base permission (fallback)

Includes:
- PHP models: User_Role, Role_Group_Permission, Role_Monitor_Permission
- Role management UI in Options > Roles tab
- Role selector in user edit form
- REST API endpoints for roles CRUD
- Translation strings for en_gb

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:34:27 -05:00
..
Component Don't add a space if there is no operator 2025-12-19 17:49:22 -05:00
AppController.php Handle user being undefined when not logged in 2024-02-11 19:12:37 -05:00
CameraModelsController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
ConfigsController.php Remove zm_configvals. Just use zm_config. Move code into loadConfig. 2025-12-22 13:17:01 -05:00
ControlsController.php Merged Angular UI branch API to master 2015-06-11 02:58:58 +00:00
EventDataController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
EventsController.php Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-16 14:55:33 -05:00
FramesController.php Use viewableMonitorIds instead of deprecated MonitorIds 2023-05-12 08:59:36 -04:00
GroupsController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
HostController.php Fix ISE when auth is turned off. 2024-10-01 10:13:38 -04:00
LogsController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
ManufacturersController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
MonitorsController.php Replace Function=>Capturing 2025-11-17 11:55:58 -05:00
PagesController.php further merges from cakephp 2.10.8 2018-03-21 13:09:55 -04:00
RolesController.php feat: add User Roles feature for reusable permission templates 2026-01-29 13:34:27 -05:00
ServerStatsController.php Add named parameters support to ServerStatsController. 2023-10-26 18:26:51 -04:00
ServersController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
SnapshotsController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
StatesController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
StorageController.php Add named parameter filtering to Storage controller 2023-05-12 14:10:53 -04:00
TagsController.php fix: add event ID to tags response. ref #4569 2026-01-26 06:40:42 -05:00
UserPreferenceController.php Finish roughing in UserPreference in api 2023-05-12 14:10:53 -04:00
UsersController.php [API] Fix User variable from array to object 2023-04-23 22:07:24 +02:00
ZonePresetsController.php fix spacing/quotes/google code style 2018-07-24 16:41:09 -04:00
ZonesController.php Fix out of date user->MonitorIds 2026-01-26 09:48:22 -05:00