Add nav menu element for custom nav elements and security value
This commit is contained in:
parent
873498e20e
commit
3b0874db49
@ -69,7 +69,11 @@ class UserContext {
|
|||||||
$userContext->email = $dataRow['email'];
|
$userContext->email = $dataRow['email'];
|
||||||
$userContext->signature = $dataRow['signature'];
|
$userContext->signature = $dataRow['signature'];
|
||||||
$userContext->language = $dataRow['language'];
|
$userContext->language = $dataRow['language'];
|
||||||
$userContext->categories = explode(',', $dataRow['categories']);
|
if (is_array($dataRow['categories'])) {
|
||||||
|
$userContext->categories = $dataRow['categories'];
|
||||||
|
} else {
|
||||||
|
$userContext->categories = explode(',', $dataRow['categories']);
|
||||||
|
}
|
||||||
$userContext->permissions = explode(',', $dataRow['heskprivileges']);
|
$userContext->permissions = explode(',', $dataRow['heskprivileges']);
|
||||||
$userContext->autoAssign = boolval($dataRow['autoassign']);
|
$userContext->autoAssign = boolval($dataRow['autoassign']);
|
||||||
$userContext->ratingNegative = intval($dataRow['ratingneg']);
|
$userContext->ratingNegative = intval($dataRow['ratingneg']);
|
||||||
|
@ -2032,6 +2032,7 @@ function hesk_getFeatureArray()
|
|||||||
'can_change_notification_settings', /* User can change notification settings */
|
'can_change_notification_settings', /* User can change notification settings */
|
||||||
'can_view_logs', /* User can view the message logs */
|
'can_view_logs', /* User can view the message logs */
|
||||||
'can_man_calendar', /* User can manage calendar events */
|
'can_man_calendar', /* User can manage calendar events */
|
||||||
|
'can_man_custom_nav', /* User can manage custom nav elements */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,6 +438,21 @@ $mails = mfh_get_mail_headers_for_dropdown($_SESSION['id'], $hesk_settings, $hes
|
|||||||
</a>
|
</a>
|
||||||
</li>';
|
</li>';
|
||||||
}
|
}
|
||||||
|
if (hesk_checkPermission('can_man_custom_nav', 0)) {
|
||||||
|
$number_of_settings++;
|
||||||
|
$active = '';
|
||||||
|
if (defined('PAGE_TITLE') && PAGE_TITLE == 'ADMIN_CUSTOM_NAV_ELEMENTS') {
|
||||||
|
$active = 'active';
|
||||||
|
}
|
||||||
|
|
||||||
|
$markup .= '
|
||||||
|
<li class="' . $active . '">
|
||||||
|
<a href="manage_custom_nav_elements.php">
|
||||||
|
<i class="fa fa-fw fa-navicon" ' . $iconDisplay . '></i>
|
||||||
|
<span>' . $hesklang['manage_custom_nav_elements'] . '</span>
|
||||||
|
</a>
|
||||||
|
</li>';
|
||||||
|
}
|
||||||
if ($number_of_settings > 0 &&
|
if ($number_of_settings > 0 &&
|
||||||
(hesk_checkPermission('can_view_logs', 0) || hesk_checkPermission('can_man_settings', 0))) {
|
(hesk_checkPermission('can_view_logs', 0) || hesk_checkPermission('can_man_settings', 0))) {
|
||||||
$markup .= '<li class="divider"></li>';
|
$markup .= '<li class="divider"></li>';
|
||||||
|
@ -2125,6 +2125,8 @@ $hesklang['url_help'] = 'The URL where the user should be taken to. Both relativ
|
|||||||
$hesklang['common_properties'] = 'Common Properties';
|
$hesklang['common_properties'] = 'Common Properties';
|
||||||
$hesklang['customer_view'] = 'Customer View';
|
$hesklang['customer_view'] = 'Customer View';
|
||||||
$hesklang['admin_panel'] = 'Admin Panel';
|
$hesklang['admin_panel'] = 'Admin Panel';
|
||||||
|
$hesklang['manage_custom_nav_elements'] = 'Manage Custom Nav Elements';
|
||||||
|
$hesklang['can_man_custom_nav'] = 'Can manage custom nav elements';
|
||||||
|
|
||||||
// DO NOT CHANGE BELOW
|
// DO NOT CHANGE BELOW
|
||||||
if (!defined('IN_SCRIPT')) die('PHP syntax OK!');
|
if (!defined('IN_SCRIPT')) die('PHP syntax OK!');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user