mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-12 13:42:38 +00:00
Do not open forbidden application
Signed-off-by: Anton Alexeyev <alexeyev.anton@gmail.com>
This commit is contained in:
parent
91870864cb
commit
b750e089e4
@ -472,9 +472,12 @@
|
||||
|
||||
if (currentAppAlias !== app) {
|
||||
clear(1)
|
||||
currentApplication = await client.findOne<Application>(workbench.class.Application, { alias: app })
|
||||
currentAppAlias = currentApplication?.alias
|
||||
navigatorModel = await buildNavModel(client, currentApplication)
|
||||
const newApplication: Application | undefined = await client.findOne<Application>(workbench.class.Application, { alias: app })
|
||||
if (newApplication?.accessLevel === undefined || hasAccountRole(account, newApplication.accessLevel)) {
|
||||
currentApplication = newApplication
|
||||
currentAppAlias = currentApplication?.alias
|
||||
navigatorModel = await buildNavModel(client, currentApplication)
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
|
Loading…
Reference in New Issue
Block a user