Skip to content

Commit

Permalink
Merge pull request #102 from H2-invent/feature/changeOrderOfServers
Browse files Browse the repository at this point in the history
first individual Server
  • Loading branch information
holema authored Mar 25, 2021
2 parents 2b290d3 + 573b6a9 commit f6a5bf4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Service/ServerUserManagment.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ public function getServersFromUser(User $user)
$servers = array();
//here we add theserver which is directed connected to a user
$servers = $user->getServers()->toArray();
$default = $this->em->getRepository(Server::class)->find($this->parameter->get('default_jitsi_server_id'));

//here we add the default group which is set in the env
if ($default && !in_array($default, $servers)) {
$servers[] = $default;
}

// here we add the servers from thekeycloak group
if ($user->getGroups()) {
Expand All @@ -55,6 +50,12 @@ public function getServersFromUser(User $user)
}
}

$default = $this->em->getRepository(Server::class)->find($this->parameter->get('default_jitsi_server_id'));
//here we add the default group which is set in the env
if ($default && !in_array($default, $servers)) {
$servers[] = $default;
}

return $servers;
}
}

0 comments on commit f6a5bf4

Please sign in to comment.