feat: Implement module permissions system with database-driven access control

- Added `users_permissions` table for managing user permissions.
- Created `PermissionRepository` for handling permission logic.
- Refactored `controls\Users::permissions()` to utilize the new database structure.
- Introduced AJAX endpoint for saving user permissions.
- Enhanced user management UI with permission checkboxes.
- Added vacation management template for handling employee absences.
- Implemented tests for `PermissionRepository`.
This commit is contained in:
2026-02-26 20:17:03 +01:00
parent 76d3ac33a8
commit a4a35c8d62
35 changed files with 2654 additions and 901 deletions

5
.vscode/ftp-kr.json vendored
View File

@@ -12,6 +12,9 @@
"ignoreRemoteModification": true,
"ignore": [
".git",
"/.vscode"
"/.vscode",
"/.serena",
"/.claude",
"CLAUDE.md"
]
}

View File

@@ -89,8 +89,8 @@
},
"UsersController.php": {
"type": "-",
"size": 3914,
"lmtime": 1770653696575,
"size": 10771,
"lmtime": 1772109739886,
"modified": false
}
},
@@ -187,6 +187,12 @@
"size": 610,
"lmtime": 1770653480229,
"modified": false
},
"VacationRepository.php": {
"type": "-",
"size": 9593,
"lmtime": 1772109599723,
"modified": false
}
}
},
@@ -229,8 +235,8 @@
},
"class.Users.php": {
"type": "-",
"size": 2072,
"lmtime": 1770654026945,
"size": 2045,
"lmtime": 1772108632777,
"modified": false
},
"class.Wiki.php": {
@@ -258,21 +264,15 @@
},
"CLAUDE.md": {
"type": "-",
"size": 4572,
"lmtime": 1771422482909,
"modified": false
},
"CODE_INDEX.md": {
"type": "-",
"size": 16884,
"lmtime": 1770652965090,
"size": 4659,
"lmtime": 1772110598538,
"modified": false
},
"config.php": {
"type": "-",
"size": 1186,
"lmtime": 1770587027872,
"modified": true
"size": 1243,
"lmtime": 1771851585764,
"modified": false
},
"cron.php": {
"type": "-",
@@ -282,17 +282,36 @@
},
".htaccess": {
"type": "-",
"size": 1024,
"lmtime": 0,
"modified": false
},
"index.php": {
"type": "-",
"size": 2464,
"size": 1055,
"lmtime": 0,
"modified": true
},
"layout": {},
"index.php": {
"type": "-",
"size": 2782,
"lmtime": 1772108635118,
"modified": false
},
"layout": {
"style.css": {
"type": "-",
"size": 31663,
"lmtime": 1772109274106,
"modified": false
},
"style.css.map": {
"type": "-",
"size": 55516,
"lmtime": 1772109274106,
"modified": false
},
"style.scss": {
"type": "-",
"size": 39770,
"lmtime": 1772111528605,
"modified": false
}
},
"libraries": {},
"logs.txt": {
"type": "-",
@@ -341,14 +360,14 @@
},
"task_edit.php": {
"type": "-",
"size": 29190,
"size": 32082,
"lmtime": 1771495910826,
"modified": false
"modified": true
},
"task_popup.php": {
"type": "-",
"size": 22823,
"lmtime": 1771426296050,
"size": 27993,
"lmtime": 1772111511936,
"modified": false
},
"task_single.php": {
@@ -373,14 +392,20 @@
},
"main-view.php": {
"type": "-",
"size": 2012,
"size": 2067,
"lmtime": 1770653623175,
"modified": false
"modified": true
},
"settings.php": {
"type": "-",
"size": 3457,
"size": 1586,
"lmtime": 0,
"modified": true
},
"vacations.php": {
"type": "-",
"size": 15969,
"lmtime": 1772109751414,
"modified": false
}
},
@@ -527,15 +552,15 @@
},
"TODO.md": {
"type": "-",
"size": 103,
"size": 0,
"lmtime": 1771423099316,
"modified": false
"modified": true
},
"upload": {},
"VIDOK_Instrukcja Montażu I Uruchomienia - Wyroby Elektryczne.pdf": {
"type": "-",
"size": 230708,
"lmtime": 1771496082255,
"lmtime": 1771920013460,
"modified": false
}
}