Do not open forbidden application

Signed-off-by: Anton Alexeyev <alexeyev.anton@gmail.com>
This commit is contained in:
Anton Alexeyev 2025-05-30 15:42:46 +07:00
parent 91870864cb
commit b750e089e4

View File

@ -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 (