Изменения механизма ограничения доступа
This commit is contained in:
@@ -262,6 +262,11 @@ class Api {
|
|||||||
async getConfig() {
|
async getConfig() {
|
||||||
return await this.request({action: 'get-config'});
|
return await this.request({action: 'get-config'});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async logout() {
|
||||||
|
await this.request({action: 'logout'});
|
||||||
|
await this.request({action: 'test'});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default vueComponent(Api);
|
export default vueComponent(Api);
|
||||||
|
|||||||
@@ -46,6 +46,14 @@
|
|||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</DivBtn>
|
</DivBtn>
|
||||||
|
|
||||||
|
<DivBtn v-if="!config.freeAccess" class="q-ml-sm text-white bg-secondary" :size="30" :icon-size="24" :imt="1" icon="la la-sign-out-alt" round @click.stop.prevent="logout">
|
||||||
|
<template #tooltip>
|
||||||
|
<q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%" max-width="400px">
|
||||||
|
Выход
|
||||||
|
</q-tooltip>
|
||||||
|
</template>
|
||||||
|
</DivBtn>
|
||||||
</div>
|
</div>
|
||||||
<div class="row q-mx-md q-mb-xs items-center">
|
<div class="row q-mx-md q-mb-xs items-center">
|
||||||
<DivBtn
|
<DivBtn
|
||||||
@@ -979,6 +987,10 @@ class Search {
|
|||||||
cloneSearch() {
|
cloneSearch() {
|
||||||
window.open(window.location.href, '_blank');
|
window.open(window.location.href, '_blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async logout() {
|
||||||
|
await this.api.logout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default vueComponent(Search);
|
export default vueComponent(Search);
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ class WebSocketController {
|
|||||||
async getConfig(req, ws) {
|
async getConfig(req, ws) {
|
||||||
const config = _.pick(this.config, this.config.webConfigParams);
|
const config = _.pick(this.config, this.config.webConfigParams);
|
||||||
config.dbConfig = await this.webWorker.dbConfig();
|
config.dbConfig = await this.webWorker.dbConfig();
|
||||||
|
config.freeAccess = this.freeAccess;
|
||||||
|
|
||||||
this.send(config, req, ws);
|
this.send(config, req, ws);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user