Skip to content

Commit

Permalink
Merge pull request #2224 from Sy-Dante/patch-1
Browse files Browse the repository at this point in the history
fix UnauthorizedException: Wrong configuration was used in forRoles
  • Loading branch information
drbyte authored Oct 21, 2022
2 parents f1ab177 + eaaeb69 commit c90f54b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Exceptions/UnauthorizedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static function forRoles(array $roles): self
{
$message = 'User does not have the right roles.';

if (config('permission.display_permission_in_exception')) {
if (config('permission.display_role_in_exception')) {
$permStr = implode(', ', $roles);
$message = 'User does not have the right roles. Necessary roles are '.$permStr;
}
Expand Down

0 comments on commit c90f54b

Please sign in to comment.