Skip to content

Commit

Permalink
fix(access): update aceess role check only for web gate
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Apr 22, 2022
1 parent 6afdd3b commit e7747ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Traits/HasDocAccessTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ private function haveAccess(UserModel $user): bool

private function hasRolesWithAccess(UserModel $user): bool
{
if (is_callable([$user, 'hasAnyRole'])) {
return $user->hasAnyRole(config('vendor-documentation.access-private-docs-roles'));
if (is_callable([$user, 'hasRole'])) {
return $user->hasRole(config('vendor-documentation.access-private-docs-roles'), 'web');
}

return true;
Expand Down

0 comments on commit e7747ec

Please sign in to comment.