UBERF-6265: Fix account creation from account service (#5132)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-04-02 13:54:45 +07:00 committed by GitHub
parent d255812d96
commit 5da63b70f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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, {}))
} }