forked from mirror/Part-DB.Part-DB-server
Merge branch 'keycloak'
This commit is contained in:
commit
6230ad971b
45 changed files with 1291 additions and 39 deletions
|
@ -45,10 +45,16 @@ class NamedDBElementRepository extends DBElementRepository
|
|||
$node->setId($entity->getID());
|
||||
$result[] = $node;
|
||||
|
||||
if ($entity instanceof User && $entity->isDisabled()) {
|
||||
//If this is an user, then add a badge when it is disabled
|
||||
$node->setIcon('fa-fw fa-treeview fa-solid fa-user-lock text-muted');
|
||||
if ($entity instanceof User) {
|
||||
if ($entity->isDisabled()) {
|
||||
//If this is an user, then add a badge when it is disabled
|
||||
$node->setIcon('fa-fw fa-treeview fa-solid fa-user-lock text-muted');
|
||||
}
|
||||
if ($entity->isSamlUser()) {
|
||||
$node->setIcon('fa-fw fa-treeview fa-solid fa-house-user text-muted');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
|
|
@ -89,4 +89,26 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU
|
|||
$this->getEntityManager()->flush();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of all local users (not SAML users).
|
||||
* @return User[]
|
||||
*/
|
||||
public function onlyLocalUsers(): array
|
||||
{
|
||||
return $this->findBy([
|
||||
'saml_user' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of all SAML users.
|
||||
* @return User[]
|
||||
*/
|
||||
public function onlySAMLUsers(): array
|
||||
{
|
||||
return $this->findBy([
|
||||
'saml_user' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue