mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-25 01:39:53 +00:00
Fix merge issue
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
7029b72a5d
commit
22ce527d28
@ -503,14 +503,6 @@ export class SpaceSecurityMiddleware extends BaseMiddleware implements Middlewar
|
|||||||
const isSpace = this.context.hierarchy.isDerived(_class, core.class.Space)
|
const isSpace = this.context.hierarchy.isDerived(_class, core.class.Space)
|
||||||
const field = this.getKey(domain)
|
const field = this.getKey(domain)
|
||||||
|
|
||||||
if (
|
|
||||||
ctx.contextData.admin === true &&
|
|
||||||
this.context.hierarchy.isDerived(_class, core.class.Space) &&
|
|
||||||
(newQuery as DocumentQuery<Space>).members !== undefined
|
|
||||||
) {
|
|
||||||
delete (newQuery as any).members
|
|
||||||
}
|
|
||||||
|
|
||||||
let clientFilterSpaces: Set<Ref<Space>> | undefined
|
let clientFilterSpaces: Set<Ref<Space>> | undefined
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@ -571,12 +563,6 @@ export class SpaceSecurityMiddleware extends BaseMiddleware implements Middlewar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ctx.contextData.admin === true && this.context.hierarchy.isDerived(_class, core.class.Space)) {
|
|
||||||
// We need to add amin to all spaces.
|
|
||||||
for (const d of findResult) {
|
|
||||||
;(d as unknown as Space).members = [...((d as unknown as Space).members ?? []), ctx.contextData.account._id]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return findResult
|
return findResult
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,6 @@ export function createServer (
|
|||||||
app.post(
|
app.post(
|
||||||
'/notify',
|
'/notify',
|
||||||
wrapRequest(async (req, res, token) => {
|
wrapRequest(async (req, res, token) => {
|
||||||
ctx.info('Received notification', { email: token.email })
|
|
||||||
if (req.body == null || !Array.isArray(req.body)) {
|
if (req.body == null || !Array.isArray(req.body)) {
|
||||||
ctx.error('Invalid request body', { body: req.body, email: token.email })
|
ctx.error('Invalid request body', { body: req.body, email: token.email })
|
||||||
throw new ApiError(400)
|
throw new ApiError(400)
|
||||||
|
Loading…
Reference in New Issue
Block a user