6 Commits
Author SHA1 Message Date
JellyfrogandGitHub c380921d4b Speed up canAccessDevice/devicesForUser (#10992)
Relying on filtering on user_id/device_id with laravel/arrays is slow.
By splitting the cache on user_id, we can utilize faster array functions
2020-02-05 18:00:08 -06:00
b361710148 Device group based access (#10568)
* Device group based access

* Use Permissions class to resolve permissions

Also give port access based on device access

* Convert more pages to use Permissions class

* shorten config setting name
use Eloquent relationships in several places
alphabetize config_definitions.json

* Change Models and Permissions

* Clean up ajax_search LIMIT sql

* Convert more pages to use Permissions class

Co-authored-by: Tony Murray <[email protected]>
2019-12-30 12:11:26 +01:00
Tony MurrayandGitHub 0807add38c Fix device groups showing multiple times. (#10247)
Update hasAccess to not use a join.
Move into The Permissions facade so we only query the db once per page load for the permissions.
2019-05-23 10:03:00 -05:00
Tony MurrayandGitHub 3a275e5807 Fix bill permissions (#10005) 2019-03-20 09:23:06 -05:00
Tony MurrayandGitHub 666c909ca6 Fix permissions issues (#10004)
Handle numbers passed as strings
2019-03-20 08:33:47 -05:00
Tony MurrayandGitHub 00a1185980 New permissions code (#9986)
* Initial permissions

* initial tests

* updates

* finish tests, other tweaks

* update legacy permissions checks
remove global :D

* missed facade extend

* Update eloquent permissions to use the new facade and drop joins

* method descriptions

* more docs

* fix style
2019-03-19 08:14:01 -05:00