| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Tests generated by Junie AI. Might not have the best possible quality
but at least we got something, and if it turns out to be complete
rubbish, we can just throw it out again without any issues, as this is
independent of the actual code base.
|
| |
|
|
|
|
|
|
|
|
| |
There was a mess of functions which mostly, but not quite, did the same
things. Get rid of a couple of them and fix call sites to use
alternative ones that also fit the job.
While at it, add phpdoc and comments to the remaining functions, trying
to clarify what they were designed for.
Lastly, the return type of functions that retrieve a location id has
been changed from false|int to ?int (nullable types are just nicer).
|
| | |
|
| |
|
|
| |
Mostly redundant checks, logic errors, dead code, etc.
|
| | |
|
| |
|
|
|
|
|
| |
* Auto-convert to utf8mb4_unicode_520_ci
* Use foreach instead of while to loop over results
* Drop useless statement caching
* Keep emulated prepares, as we sometimes loop over nested queries
|
| |
|
|
|
| |
If a permission check for a location yielded false, a cache entry for
all parent locations with value "false" was created as well.
|
| |
|
|
|
|
|
| |
Some pages, like the location list, triggered excessive amounts of DB
queries when checking permissions. In that specific case, the number of
queries got cut down from 260 to 24, and the page generation time
dropped from 150ms to 80ms. (On a setup with 62 locations)
|
| | |
|
| |
|
|
| |
table naming, drop unused id field
|
| |
|
|
|
|
|
| |
Permissinmanager is now protected by permissions.
In order to prevent complete lockout, the user with
userid == 1 will always be able to edit and assign permissions.
(TODO: Communicate this somehow)
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
mode, comments
|
| |
|
|
| |
modules
|
| |
|
|
|
|
|
|
|
|
| |
This flag tells wether the permission can be restricted to certain
locations in a meaningful way. This flag has to be set in the
permissions.json of the according module.
For example, the permission to reboot the server cannot be limited
to certain locations in a meaningful way, while the view of the
client log can be filtered to only show log entries for clients
in specific locations.
|
| |
|
|
| |
result array if the user has locationid 0 for this permission
|
| |
|
|
|
|
|
|
| |
changed searchFieldFunction() to use jQuery; fixed checkboxes in
roleeditor not selecting on a click on the label; added selected row
highlighting; disabled buttons if there are no users/roles selected;
made role badges in user/location tables clickable; added phpdoc
comments to most php functions;
|
| | |
|
| |
|
|
|
| |
Most of them were found by phpstorm, so I put in some time and
went through the list, fixing quite a bunch of them.
|
| |
|
|
|
| |
moved add/delete buttons to the right; items in the user and locations
table can now be selected by clicking anywhere in the table row;
|
| |
|
|
| |
all locations;
|
| |
|
|
|
| |
changed nested php for loops to sql code; standardized sql column naming;
small bugfixes;
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
a given permission + bugfixes
|
| | |
|
| |
|
|
| |
using bind variables in mysql code, changed order of modules in role editor
|
| |
|