@@ 127-138 (lines=12) @@ | ||
124 | * |
|
125 | * @return mixed |
|
126 | */ |
|
127 | public function getAllPermissions() |
|
128 | { |
|
129 | $model = get_class($this) == config('laravel-acl.level') ? 'Level' : 'User'; |
|
130 | ||
131 | return \Cache::remember( |
|
132 | 'laravel-acl.getAllPermissionsFor' . $model . '_' . $this->id, |
|
133 | config('laravel-acl.cacheMinutes'), |
|
134 | function () { |
|
135 | return $this->cacheGetAllPermissions(); |
|
136 | } |
|
137 | ); |
|
138 | } |
|
139 | ||
140 | /** |
|
141 | * USER & LEVEL |
|
@@ 149-160 (lines=12) @@ | ||
146 | * |
|
147 | * @return mixed |
|
148 | */ |
|
149 | public function getInheritedPermissions() |
|
150 | { |
|
151 | $model = get_class($this) == config('laravel-acl.level') ? 'Level' : 'User'; |
|
152 | ||
153 | return \Cache::remember( |
|
154 | 'laravel-acl.getInheritedPermissionsFor' . $model . '_' . $this->id, |
|
155 | config('laravel-acl.cacheMinutes'), |
|
156 | function () { |
|
157 | return $this->cacheGetInheritedPermissions(); |
|
158 | } |
|
159 | ); |
|
160 | } |
|
161 | ||
162 | /** |
|
163 | * USER & LEVEL |
|
@@ 171-182 (lines=12) @@ | ||
168 | * |
|
169 | * @return mixed |
|
170 | */ |
|
171 | public function getAvailablePermissions() |
|
172 | { |
|
173 | $model = get_class($this) == config('laravel-acl.level') ? 'Level' : 'User'; |
|
174 | ||
175 | return \Cache::remember( |
|
176 | 'laravel-acl.getAvailablePermissionsFor' . $model . '_' . $this->id, |
|
177 | config('laravel-acl.cacheMinutes'), |
|
178 | function () { |
|
179 | return $this->cacheGetAvailablePermissions(); |
|
180 | } |
|
181 | ); |
|
182 | } |
|
183 | ||
184 | /** |
|
185 | * USER & LEVEL |