mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 19:44:59 +03:00
UBERF-6265: Fix account creation from account service (#5132)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
d255812d96
commit
5da63b70f4
@ -1092,7 +1092,7 @@ export async function getWorkspaceInfo (
|
|||||||
|
|
||||||
const [ws] = (
|
const [ws] = (
|
||||||
await db.collection<Workspace>(WORKSPACE_COLLECTION).find(withProductId(productId, query)).toArray()
|
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) {
|
if (ws == null) {
|
||||||
throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {}))
|
throw new PlatformError(new Status(Severity.ERROR, platform.status.Forbidden, {}))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user