File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -249,14 +249,13 @@ public function hasAnyPermission(...$permissions): bool
249
249
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection ...$permissions
250
250
*
251
251
* @return bool
252
- * @throws \Exception
253
252
*/
254
253
public function hasAllPermissions (...$ permissions ): bool
255
254
{
256
255
$ permissions = collect ($ permissions )->flatten ();
257
256
258
257
foreach ($ permissions as $ permission ) {
259
- if (! $ this ->hasPermissionTo ($ permission )) {
258
+ if (! $ this ->checkPermissionTo ($ permission )) {
260
259
return false ;
261
260
}
262
261
}
@@ -486,6 +485,7 @@ public function forgetCachedPermissions()
486
485
487
486
/**
488
487
* Check if the model has All of the requested Direct permissions.
488
+ *
489
489
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection ...$permissions
490
490
* @return bool
491
491
*/
@@ -504,6 +504,7 @@ public function hasAllDirectPermissions(...$permissions): bool
504
504
505
505
/**
506
506
* Check if the model has Any of the requested Direct permissions.
507
+ *
507
508
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection ...$permissions
508
509
* @return bool
509
510
*/
You can’t perform that action at this time.
0 commit comments