Fix SQl queries being executed unnecessarily when listing servers
This commit is contained in:
parent
eaf54a8c63
commit
a31334c0c5
3 changed files with 4 additions and 3 deletions
|
@ -216,7 +216,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
|
|||
*/
|
||||
public function filterUserAccessServers(User $user, int $level, bool $paginate = true)
|
||||
{
|
||||
$instance = $this->getBuilder()->select($this->getColumns())->with(['user']);
|
||||
$instance = $this->getBuilder()->select($this->getColumns())->with(['user', 'node', 'allocation']);
|
||||
|
||||
// If access level is set to owner, only display servers
|
||||
// that the user owns.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue