Commit Graph

455 Commits

Author SHA1 Message Date
Isaac Connor
59fdffa62b Handle no meminfo. 2026-01-30 08:33:49 -05:00
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
Isaac Connor
c63317f371 If a single file is passed to output_script, handle it 2026-01-24 10:47:27 -05:00
Isaac Connor
c5c61722cb Remove nav-link from flip chevron so it doesn't get the kill stream onclick handler 2025-10-30 14:16:38 -04:00
Isaac Connor
f139fbf381 Fix typo 2025-10-03 15:18:01 -04:00
Isaac Connor
50ad45cd68 Implement output_script which logs an error if a script doesn't exist instead of silently failing 2025-10-02 11:05:09 -04:00
Isaac Connor
0d596b4704 Introduce output_link which doesn't check for existence. The reason being to generate errors on a required include 2025-09-26 19:16:34 -04:00
Isaac Connor
22fcd82371 Move montage specific includes to montage.php. Fix gridstack css links 2025-09-26 18:39:18 -04:00
Isaac Connor
55d97316d7 Don't cache bust gridstack and move it to a versioned directory 2025-09-23 16:11:18 -04:00
IgorA100
87796632bf Merge branch 'master' into patch-896443 2025-08-04 19:19:12 +03:00
Isaac Connor
833b01312c MOve montage specific gridstack css out of functions.php to montage.php 2025-08-04 11:55:52 -04:00
IgorA100
6fe174ab4d Merge branch 'master' into patch-896443 2025-08-01 14:01:51 +03:00
Isaac Connor
8c8fa55f88 Fix spacing to make code more readable 2025-07-30 11:16:09 -05:00
IgorA100
64f65f5f53 - Use folder "noUiSlider-15.8.1" instead of "noUiSlider"
- Load minified files ".j" and ".css"
2025-07-30 11:05:57 +03:00
IgorA100
207d84dc3b Loaded "nouislider" (functions.php) 2025-07-29 16:49:33 +03:00
Isaac Connor
0268474974 Remove debug, improve logged message when fonts take too long to load 2025-07-22 14:02:22 -04:00
Isaac Connor
f513470f94 Merge pull request #4347 from IgorA100/patch-534527
Now we build the Options submenu in only one place and using the "ZM_Menu" class
2025-07-22 13:21:29 -04:00
IgorA100
03f000d218 Замена tab @ functions.php 2025-07-18 00:41:40 +03:00
IgorA100
7d0844f9a6 Added a comment to the code (functions.php) 2025-07-15 10:48:13 +03:00
IgorA100
e0ebf8373e Translation and replacement of words should be carried out at the time of submenu assembly (functions.php) 2025-07-15 00:38:24 +03:00
IgorA100
11f1e82a3f Perform translation only after all necessary word replacements (functions.php) 2025-07-15 00:11:57 +03:00
IgorA100
2f277c67c6 Need to rename 'Version' => 'Versions' (functions.php)
Because transferring 'Version' => 'Versions' into translation would be completely incorrect!
2025-07-14 23:11:54 +03:00
IgorA100
b94eb74ae5 Added missing menu item 'servers' (functions.php) 2025-07-14 22:51:07 +03:00
IgorA100
6352f6419d Moved Skins renaming to Display to the correct location (functions.php) 2025-07-14 18:55:14 +03:00
IgorA100
e173130ca8 Fix: For the left menu, we create a normal, not collapsed NavBarHTML (functions.php)
Closed #4351
2025-07-11 12:42:29 +03:00
IgorA100
f9ece1c22d Merge branch 'master' into patch-534527 2025-07-10 01:15:09 +03:00
IgorA100
ad650e8443 Added a class for assembling menus and submenus (functions.php) 2025-07-06 22:14:40 +03:00
Isaac Connor
cea86e9d4e Only add about zoneminder links if ZM_HOME_ABOUT is set 2025-07-05 12:03:08 -04:00
Isaac Connor
225b428592 Rework left vs top as NAVBAR_TYPE 2025-07-05 11:46:06 -04:00
IgorA100
8220407774 Changed "Use old menu view" to "Use Top menu" (functions.php) 2025-07-02 18:48:57 +03:00
IgorA100
e108bda566 Added support for "ZM_WEB_NAVBAR_LINKS" for the menu in the left sidebar (functions.php) 2025-07-01 00:43:16 +03:00
Isaac Connor
e482f0658d Merge pull request #4311 from IgorA100/patch-617239
Feat: Added left side menu
2025-06-28 14:55:23 -04:00
Isaac Connor
6e6feba300 Put the links in a li 2025-06-23 12:47:29 -05:00
Isaac Connor
762ee7a2a3 Rough in navbar additional links functionality 2025-06-23 11:59:44 -05:00
IgorA100
ec8d920315 Added a link to zmninja.zoneminder.com "functions.php" to the menu 2025-06-17 22:28:19 +03:00
IgorA100
456f084cec Added link to Slack (functions.php) 2025-05-09 20:34:01 +03:00
IgorA100
945be7d27e For "#extruderLeft" do not apply ".hidden-shift" (functions.php) 2025-04-15 20:15:09 +03:00
IgorA100
72b3cc77be Load files from "assets/pro-sidebar-template/dist" instead of "assets/pro-sidebar-template" (functions.php) 2025-04-15 17:52:27 +03:00
IgorA100
9f9ccc3248 Add "$tabs['auth'] = translate('Authentication');" from options.php (functions.php) 2025-04-15 12:02:56 +03:00
IgorA100
bb7c18797a Feat: Added left side menu (functions.php) 2025-04-15 10:34:24 +03:00
IgorA100
a662503292 Feat: Added "preload" for "fontawesome-webfont.woff2" (functions.php)
When updating the file "css/font-awesome.min.css" you MUST check what path to "fontawesome-webfont.woff2" is specified, as well as the version after the "?" If necessary, make changes to this file. Otherwise, "preload" will not work.
2025-04-13 01:06:57 +03:00
IgorA100
1166000c28 Added "preload" for "material-icons.woff2", added parameters to the call "output_link_if_exists" (functions.php)
Now material-icons.woff2 starts loading without the slightest delay. 99.99% of the time is spent loading the file.
material-icons.woff is not preloaded, because if it is loaded simultaneously with material-icons.woff2, then a lot of time is wasted.
If you use JS to determine the browser's support for woff2, and then preload, it does not work. The font will be loaded in normal mode, without preload.
Almost all modern browsers support woff2.
This option is the fastest.
2025-04-11 13:40:40 +03:00
IgorA100
e3acc2a2d6 Move "FontFaceObserver" to the top (functions.php)
Now we don't have to wait for the DOM to fully load (without media content) to change the class of elements.
Now after loading the font, we write the style for displaying the font in the DOM.
2025-04-10 22:57:15 +03:00
IgorA100
fd1d4affa5 Moved here from skin.js the control of loading the font "Material Icons" to speed up the display (functions.php) 2025-04-10 20:53:46 +03:00
IgorA100
388710af9e Load material-icons.css if it exists (functions.php) 2025-04-10 13:18:28 +03:00
IgorA100
7a280607c2 Fix: Restored missing closing tag </tr> in fn "getStatsTableHTML" (functions.php) 2025-03-17 13:52:24 +03:00
Isaac Connor
b89d404181 Update bootstrap-table to 1.23.5 2024-10-02 14:23:03 -04:00
Isaac Connor
194337c247 Upgrade to bootstrap-table-1.23.3 2024-09-23 10:13:13 -04:00
Isaac Connor
528b155714 Merge blocks of output_link_if_exists 2024-09-12 09:21:19 -04:00
Isaac Connor
9e9d47d8b7 Split xhtmlHeaders into Start and End functions so that views that want to include more css in the head can do so. 2024-09-11 12:02:03 -04:00