snipe-it/app/Models
Daniel Meltzer 3cea12565b Add missing policies (#4330)
* Add Authorizable trait and interface to our user model so we have access to User::can/User::cant.  We should take a look at where else our user model has diverged from Larvel since it was created...

* Policy cleanup/fixes.

This commit adds policies for the missing backend/"settings" areas.  The
permissions were implemented a while back but the policies did not, so
authorizing actions was failing.

In addition, this condenses a lot of code in the policies into base
classes.  Most of the files were identical except for table names, so we
move all of the checks into a base class and override the table name in
each policy.

* Use a better name and permission for the check in the default layout.
2017-10-27 18:01:11 -07:00
..
Accessory.php Fixes #1044 - adds suppliers and image to accessories (#4266) 2017-10-19 16:25:24 -07:00
Actionlog.php Bulk asset audit form (needs more testing) 2017-08-29 16:00:22 -07:00
Asset.php Fixed order number and warranty bug in importer 2017-10-26 16:13:35 -07:00
AssetMaintenance.php Fixes #4220 - allow nullable for completion date 2017-10-16 18:32:48 -07:00
AssetModel.php Fix for ambiguous query on models 2017-10-10 23:12:16 -07:00
Category.php Vue importer (#3235) 2017-01-25 21:29:23 -08:00
CheckoutRequest.php Port more assignedUser to assignedTo. 2016-12-29 09:31:16 -05:00
Company.php Features/image uploads (#4320) 2017-10-25 22:35:58 -07:00
CompanyableChildScope.php Updated docblocks 2016-04-07 13:21:09 -07:00
CompanyableChildTrait.php Version 3 - hold onto your butts 2016-03-25 01:18:05 -07:00
CompanyableScope.php Updated docblocks 2016-04-07 13:21:09 -07:00
CompanyableTrait.php Version 3 - hold onto your butts 2016-03-25 01:18:05 -07:00
Component.php Standardized component API output 2017-10-07 06:56:18 -07:00
Consumable.php Assorted fixes (#3923) 2017-09-05 17:54:58 -07:00
ConsumableAssignment.php Version 3 - hold onto your butts 2016-03-25 01:18:05 -07:00
CustomField.php Hopefully fixes #4163 2017-10-11 14:18:08 -07:00
CustomFieldset.php More specific required check 2017-09-29 03:44:23 -07:00
Department.php Allow manager to be null for dept 2017-05-23 02:49:00 -07:00
Depreciable.php Partialize forms (#2884) 2016-11-16 16:56:57 -08:00
Depreciation.php Fixed Illuminate path 2017-02-22 22:20:57 -08:00
Group.php Fixes group search 2017-10-10 22:59:32 -07:00
ICompanyableChild.php Version 3 - hold onto your butts 2016-03-25 01:18:05 -07:00
Import.php Importer mapping - v1 (#3677) 2017-06-21 16:37:37 -07:00
Ldap.php Tidying some of the LDAP UDN logic 2017-10-16 15:29:06 -07:00
License.php Make fields nullable for licenses 2017-09-27 22:11:20 -07:00
LicenseSeat.php Actionlog Class: Improvements and polymorphism (#2561) 2016-09-06 19:39:42 -07:00
Location.php Fix to bad relation definition in Location. (#4306) 2017-10-24 16:52:45 -07:00
Loggable.php Fixes #4001 - license checkout not working 2017-09-25 21:40:43 -07:00
Manufacturer.php Fixes #3311 - more fields for manufacturers 2017-03-10 22:08:59 -08:00
Requestable.php Assorted fixes (#3923) 2017-09-05 17:54:58 -07:00
Setting.php Fixes #4240 - allows admins to use custom password reset URL 2017-10-19 12:22:27 -07:00
SnipeModel.php Restoring older SnipeModel attribute setters 2017-09-27 16:39:20 -07:00
Statuslabel.php Clesned up status label model for code quality 2017-10-26 22:54:07 -07:00
Supplier.php Fixes #1044 - adds suppliers and image to accessories (#4266) 2017-10-19 16:25:24 -07:00
Throttle.php Version 3 - hold onto your butts 2016-03-25 01:18:05 -07:00
User.php Add missing policies (#4330) 2017-10-27 18:01:11 -07:00