forked from deblan/side_menu
add an option to force settings to users
This commit is contained in:
parent
4b6a1f2989
commit
c7f9fd1b8b
10 changed files with 197 additions and 152 deletions
|
|
@ -84,19 +84,20 @@ class JsController extends Controller
|
|||
$topMenuApps = $this->config->getAppValueArray('top-menu-apps', '[]');
|
||||
$targetBlankApps = $this->config->getAppValueArray('target-blank-apps', '[]');
|
||||
$useAvatar = $this->config->getAppValueBool('use-avatar', '0');
|
||||
$isForced = $this->config->getAppValueBool('force', '0');
|
||||
$avatar = null;
|
||||
|
||||
if ($this->user) {
|
||||
$userTopMenuApps = $this->config->getUserValueArray($this->user, 'top-menu-apps', '[]');
|
||||
|
||||
if (!empty($userTopMenuApps)) {
|
||||
if (!empty($userTopMenuApps) && !$isForced) {
|
||||
$topMenuApps = $userTopMenuApps;
|
||||
}
|
||||
|
||||
$userTargetBlankMode = $this->config->getUserValueInt($this->user, 'target-blank-mode', '1');
|
||||
$userTargetBlankApps = $this->config->getUserValueArray($this->user, 'target-blank-apps', '[]');
|
||||
|
||||
if (2 === $userTargetBlankMode) {
|
||||
if (2 === $userTargetBlankMode && !$isForced) {
|
||||
$targetBlankApps = $userTargetBlankApps;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue