mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-28 04:30:08 +02:00
Hide trees in sidebar, if user does not have permission to show them (and protect the JSON endpoints)
This commit is contained in:
parent
10a035fcea
commit
d0f7949bc9
5 changed files with 52 additions and 21 deletions
|
@ -72,7 +72,7 @@ abstract class ExtendedVoter extends Voter
|
|||
return false;
|
||||
}
|
||||
|
||||
// if the user is anonymous, we use the anonymous user.
|
||||
// if the user is anonymous (meaning $user is null), we use the anonymous user.
|
||||
if (!$user instanceof User) {
|
||||
/** @var UserRepository $repo */
|
||||
$repo = $this->entityManager->getRepository(User::class);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue