diff --git a/module/index/js/index.ui.js b/module/index/js/index.ui.js index b1298a36f5..c8c33af72c 100644 --- a/module/index/js/index.ui.js +++ b/module/index/js/index.ui.js @@ -1356,7 +1356,6 @@ $(document).ready( allAppsItemsMap.set(item.code, item); } - if(!canConverse) $('.ai-panel-root').remove(); } ); diff --git a/module/index/ui/index.html.php b/module/index/ui/index.html.php index ea319d8c57..1b80b8dbd5 100644 --- a/module/index/ui/index.html.php +++ b/module/index/ui/index.html.php @@ -221,12 +221,12 @@ div /* Inject zai config to index page. */ if($zaiConfig && !empty($zaiConfig->host) && !empty($zaiConfig->token)) { + if(!hasPriv('aiapp', 'conversation')) $zaiConfig->privs = 'disable-all'; to::head ( h::js('window.zai = ' . js::value($zaiConfig) . ';'), h::importJs($app->getWebRoot() . 'js/zui3/ai.js', setID('aiJS')) ); - jsVar('canConverse', hasPriv('aiapp', 'conversation')); } /**