displayed nextcloud user menu like moodle and wp applications - not for admins!
parent
5d5ef2f884
commit
6db2b8c60f
|
@ -23,6 +23,7 @@
|
||||||
$api_url = "https://" . preg_replace('/^nextcloud\./', 'api.', $_SERVER['HTTP_HOST']);
|
$api_url = "https://" . preg_replace('/^nextcloud\./', 'api.', $_SERVER['HTTP_HOST']);
|
||||||
$avatar_url = "https://" . preg_replace('/^nextcloud\./', 'sso.', $_SERVER['HTTP_HOST']) . "/auth/realms/master/avatar-provider";
|
$avatar_url = "https://" . preg_replace('/^nextcloud\./', 'sso.', $_SERVER['HTTP_HOST']) . "/auth/realms/master/avatar-provider";
|
||||||
$profile_url = "https://" . preg_replace('/^nextcloud\./', 'sso.', $_SERVER['HTTP_HOST']) . "/auth/realms/master/account";
|
$profile_url = "https://" . preg_replace('/^nextcloud\./', 'sso.', $_SERVER['HTTP_HOST']) . "/auth/realms/master/account";
|
||||||
|
$showsettings = in_array($_['user_uid'], ['admin', 'ddadmin']) ? true : false;
|
||||||
|
|
||||||
// Remove user menu Settings item for non-administrator users
|
// Remove user menu Settings item for non-administrator users
|
||||||
if(!array_key_exists('core_apps', $_["settingsnavigation"])){
|
if(!array_key_exists('core_apps', $_["settingsnavigation"])){
|
||||||
|
@ -153,7 +154,15 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php foreach ($_['settingsnavigation'] as $entry):?>
|
<?php foreach ($_['settingsnavigation'] as $entry):?>
|
||||||
<?php if ($entry['id'] == 'logout') { ?>
|
<?php if ($showsettings) { ?>
|
||||||
|
<li data-id="<?php p($entry['id']); ?>">
|
||||||
|
<a href="<?php print_unescaped($entry['href']); ?>"
|
||||||
|
<?php if ($entry["active"]): ?> class="active"<?php endif; ?>>
|
||||||
|
<img alt="" src="<?php print_unescaped($entry['icon'] . '?v=' . $_['versionHash']); ?>">
|
||||||
|
<?php p($entry['name']) ?>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php } else if ($entry['id'] == 'logout') { ?>
|
||||||
<li data-id="<?php p($entry['id']); ?>">
|
<li data-id="<?php p($entry['id']); ?>">
|
||||||
<a href="<?php print_unescaped($entry['href']); ?>">
|
<a href="<?php print_unescaped($entry['href']); ?>">
|
||||||
<div class="ddiconcontainer">
|
<div class="ddiconcontainer">
|
||||||
|
|
Loading…
Reference in New Issue