#196 Add permission type and navbar link to templates page
This commit is contained in:
parent
c21b5f24bb
commit
ef85d1c5f3
@ -46,8 +46,7 @@ hesk_dbConnect();
|
||||
hesk_isLoggedIn();
|
||||
|
||||
/* Check permissions for this feature */
|
||||
//TODO Create and use new permission here
|
||||
hesk_checkPermission('can_man_cat');
|
||||
hesk_checkPermission('can_man_permission_tpl');
|
||||
|
||||
/* What should we do? */
|
||||
if ( $action = hesk_REQUEST('a') )
|
||||
|
@ -1943,5 +1943,6 @@ function hesk_getFeatureArray() {
|
||||
'can_man_email_tpl', /* User can manage email templates */
|
||||
'can_man_ticket_statuses', /* User can manage ticket statuses */
|
||||
'can_set_manager', /* User can set category managers */
|
||||
'can_man_permission_tpl', /* User can manage permission templates */
|
||||
);
|
||||
}
|
@ -68,8 +68,21 @@ if ( hesk_check_kb_only(false) )
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="admin_main.php"><i class="fa fa-home" <?php echo $iconDisplay; ?>></i> <?php echo $hesklang['main_page']; ?></a></li>
|
||||
<?php if (hesk_checkPermission('can_man_users',0)) {
|
||||
<?php if (hesk_checkPermission('can_man_users', 0) && hesk_checkPermission('can_man_permission_tpl', 0)) {
|
||||
echo '<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
|
||||
<i class="fa fa-users" '.$iconDisplay.'></i> '.$hesklang['menu_users'].'<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="manage_users.php">'.$hesklang['manage_users'].'</a></li>
|
||||
<li><a href="manage_permission_templates.php">'.$hesklang['permission_tpl_man'].'</a></li>
|
||||
</ul>
|
||||
</li>';
|
||||
} elseif (hesk_checkPermission('can_man_users',0)) {
|
||||
echo '<li><a href="manage_users.php"><i class="fa fa-users" '.$iconDisplay.'></i> '.$hesklang['menu_users'].'</a></li>';
|
||||
} elseif (hesk_checkPermission('can_man_permission_tpl', 0)) {
|
||||
echo '<li><a href="manage_permission_templates.php">
|
||||
<i class="fa fa-users" '.$iconDisplay.'></i> '.$hesklang['permission_templates'].'</a></li>';
|
||||
}
|
||||
if (hesk_checkPermission('can_man_cat',0)) {
|
||||
echo '<li><a href="manage_categories.php"><i class="fa fa-pie-chart" '.$iconDisplay.'></i> '.$hesklang['menu_cat'].'</a></li>';
|
||||
|
@ -96,6 +96,8 @@ $hesklang['permission_template_deleted'] = 'Permission template deleted!';
|
||||
$hesklang['permission_template_now_admin'] = 'Permission template is now designed as an admin template';
|
||||
$hesklang['permission_template_no_longer_admin'] = 'Permission template is no longer designated as an admin template';
|
||||
$hesklang['cannot_change_admin_staff'] = 'You cannot change admin/non-admin status for the <b>Administrator</b> and <b>Staff</b> templates!';
|
||||
$hesklang['permission_tpl_man'] = 'Manage permission templates'; // Menu link
|
||||
$hesklang['permission_templates'] = 'Permission Templates';
|
||||
|
||||
// ADDED OR MODIFIED IN Mods for HESK 2.2.1
|
||||
$hesklang['popart_no_colon']='Top Knowledgebase Articles'; // same as $hesklang['popart'] but without a colon (:)
|
||||
|
Loading…
x
Reference in New Issue
Block a user