1 | <?php |
||
16 | trait UserOnly |
||
17 | { |
||
18 | /** USER |
||
19 | * A User can have permissions explicitly assigned to it |
||
20 | * |
||
21 | * @return mixed |
||
22 | */ |
||
23 | public function permissions() |
||
27 | |||
28 | /** |
||
29 | * Negate a permission from a User |
||
30 | * |
||
31 | * @param $permission |
||
32 | */ |
||
33 | public function negatePermission($permission) |
||
37 | |||
38 | /** |
||
39 | * Negate an array of permissions from a User |
||
40 | * |
||
41 | * @param $permissions |
||
42 | */ |
||
43 | public function negatePermissions(array $permissions) |
||
47 | |||
48 | /** |
||
49 | * First try the cache to return the collection, |
||
50 | * then fetch it from the database. |
||
51 | * |
||
52 | * See @cacheGetNegatedPermissions() |
||
53 | * @return mixed |
||
54 | */ |
||
55 | public function getNegatedPermissions() |
||
65 | |||
66 | /** |
||
67 | * Return a collection of permissions that |
||
68 | * are negated for a User |
||
69 | * |
||
70 | * @return mixed |
||
71 | */ |
||
72 | protected function cacheGetNegatedPermissions() |
||
76 | } |