mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
Don't show public spaces for readonly role (#9182)
Signed-off-by: Anton Alexeyev <alexeyev.anton@gmail.com>
This commit is contained in:
@@ -466,7 +466,8 @@ export class SpaceSecurityMiddleware extends BaseMiddleware implements Middlewar
|
||||
...this.systemSpaces,
|
||||
...this.mainSpaces
|
||||
]
|
||||
const unfilteredRes = isData ? res : [...res, ...this.publicSpaces]
|
||||
const ignorePublicSpaces = isData || account.role === AccountRole.ReadOnlyGuest
|
||||
const unfilteredRes = ignorePublicSpaces ? res : [...res, ...this.publicSpaces]
|
||||
if (showArchived) {
|
||||
return unfilteredRes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user