mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-30 02:37:46 +03:00
Fix model find space security (#6210)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
e1e6d6427e
commit
f4b6db67a5
@ -17,6 +17,7 @@ import core, {
|
||||
AccountRole,
|
||||
AttachedDoc,
|
||||
Class,
|
||||
DOMAIN_MODEL,
|
||||
Doc,
|
||||
DocumentQuery,
|
||||
Domain,
|
||||
@ -510,7 +511,7 @@ export class SpaceSecurityMiddleware extends BaseMiddleware implements Middlewar
|
||||
const isSpace = this.storage.hierarchy.isDerived(_class, core.class.Space)
|
||||
const field = this.getKey(domain)
|
||||
|
||||
if (!isSystem(account) && account.role !== AccountRole.DocGuest) {
|
||||
if (!isSystem(account) && account.role !== AccountRole.DocGuest && domain !== DOMAIN_MODEL) {
|
||||
if (!isOwner(account, ctx) || !isSpace) {
|
||||
if (query[field] !== undefined) {
|
||||
const res = await this.mergeQuery(account, query[field], domain, isSpace)
|
||||
|
Loading…
Reference in New Issue
Block a user