mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 09:35:00 +02:00
UBERF-6265: Fix account creation from account service (#5132)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -1092,7 +1092,7 @@ export async function getWorkspaceInfo (
|
||||
|
||||
const [ws] = (
|
||||
await db.collection<Workspace>(WORKSPACE_COLLECTION).find(withProductId(productId, query)).toArray()
|
||||
).filter((it) => it.disabled !== true)
|
||||
).filter((it) => it.disabled !== true || account?.admin === true)
|
||||
if (ws == null) {
|
||||
throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user