Skip to content

Commit

Permalink
BUGFIX: Use like to filter out user workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellienert committed Jul 6, 2021
1 parent 4fa5243 commit 7a85d99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Classes/Service/WorkspaceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,24 @@ public function getInternalWorkspaceNames(): array
return $this->internalWorkspaceNames;
}

/**
* See Workspace::isPrivateWorkspace
*
* @return array
*/
public function getPrivateWorkspaceNames(): array
{
if (is_array($this->privateWorkspaceNames)) {
return $this->privateWorkspaceNames;
}

$query = $this->workspaceRepository->createQuery();

$result = $query->matching(
$query->logicalAnd(
$query->logicalNot($query->equals('baseWorkspace', null)),
$query->logicalNot($query->equals('owner', null)),
$query->logicalNot($query->equals('name', Workspace::PERSONAL_WORKSPACE_PREFIX . '%'))
$query->logicalNot($query->like('name', Workspace::PERSONAL_WORKSPACE_PREFIX . '%'))
)
)->execute();

Expand Down

0 comments on commit 7a85d99

Please sign in to comment.