Browse Source

Closes #61: Manage help desk settings can be toggled for non-admins and admins

merge-requests/2/head
Mike Koch 7 years ago
parent
commit
96f73211d9
  1. 2
      admin/admin_settings.php
  2. 2
      admin/admin_settings_save.php
  3. 5
      admin/manage_users.php
  4. 2
      inc/show_admin_nav.inc.php
  5. 2
      language/en/text.php

2
admin/admin_settings.php

@ -56,7 +56,7 @@ hesk_dbConnect();
hesk_isLoggedIn();
// Check permissions for this feature
hesk_checkPermission('can_man_settings');
hesk_checkPermission('can_manage_settings');
// Test languages function
if (isset($_GET['test_languages']))

2
admin/admin_settings_save.php

@ -49,7 +49,7 @@ hesk_dbConnect();
hesk_isLoggedIn();
// Check permissions for this feature
hesk_checkPermission('can_man_settings');
hesk_checkPermission('can_manage_settings');
// A security check
hesk_token_check('POST');

5
admin/manage_users.php

@ -61,7 +61,6 @@ $hesk_settings['features'] = array(
'can_man_users', /* User can create and edit staff accounts */
'can_man_cat', /* User can manage categories/departments */
'can_man_canned', /* User can manage canned responses */
'can_man_settings', /* User can manage help desk settings */
'can_add_archive', /* User can mark tickets as "Tagged" */
'can_assign_self', /* User can assign tickets to himself/herself */
'can_assign_others', /* User can assign tickets to other staff members */
@ -278,7 +277,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
</div>
<?php } if ($_SESSION['can_manage_settings']) { ?>
<div class="checkbox">
<label><input type="checkbox" name="manage_settings"> Can Manage Settings (!)</label>
<label><input type="checkbox" name="manage_settings"> <?php echo $hesklang['can_man_settings']; ?></label>
</div>
<?php } ?>
</div>
@ -691,7 +690,7 @@ function edit_user()
<?php if (isset($_SESSION['userdata']['can_manage_settings'])) { ?>
<label><input type="checkbox" name="manage_settings"
<?php if ($_SESSION['userdata']['can_manage_settings']) { echo 'checked="checked"';} ?>
<?php if (!$_SESSION['can_manage_settings']) { echo 'disabled'; } ?>> Can Manage Settings (!)</label>
<?php if (!$_SESSION['can_manage_settings']) { echo 'disabled'; } ?>> <?php echo $hesklang['can_man_settings']; ?></label>
<?php if (!$_SESSION['can_manage_settings'] && $_SESSION['userdata']['can_manage_settings']) {
echo '<input type="hidden" name="manage_settings" value="1">';
} ?>

2
inc/show_admin_nav.inc.php

@ -59,7 +59,7 @@ $num_mail = hesk_checkNewMail();
else {echo '<li><a href="knowledgebase_private.php"><i class="fa fa-book" '.$iconDisplay.'></i>&nbsp;'.$hesklang['menu_kb'].'</a></li>';}
if (hesk_checkPermission('can_run_reports',0)) {echo '<li><a href="reports.php"><i class="fa fa-line-chart" '.$iconDisplay.'></i>&nbsp;'.$hesklang['reports'].'</a></li>';}
elseif (hesk_checkPermission('can_export',0)) {echo '<li><a href="export.php"><i class="fa fa-line-chart" '.$iconDisplay.'></i>&nbsp;'.$hesklang['reports'].'</a></li>';}
if (hesk_checkPermission('can_man_settings',0)) {echo '<li><a href="admin_settings.php"><i class="fa fa-cog" '.$iconDisplay.'></i>&nbsp;'.$hesklang['settings'].'</a></li>';} ?>
if (hesk_checkPermission('can_manage_settings',0)) {echo '<li><a href="admin_settings.php"><i class="fa fa-cog" '.$iconDisplay.'></i>&nbsp;'.$hesklang['settings'].'</a></li>';} ?>
<li><a href="profile.php"><i class="fa fa-user" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['menu_profile']; ?></a></li>
<li><a href="mail.php"><i class="fa fa-envelope-o" <?php echo $iconDisplay; ?>></i>&nbsp;<?php echo $hesklang['menu_msg']; ?>
<?php if ($num_mail != 0)

2
language/en/text.php

@ -25,6 +25,7 @@ $hesklang['EMAIL_HR']='------ Reply above this line ------';
$hesklang['display_rtl'] = 'Display site right-to-left';
$hesklang['show_icons_navigation'] = 'Show icons on navigation bar';
$hesklang['enable_maintenance'] = 'Enable maintenance mode';
$hesklang['can_man_settings']='Can manage help desk settings';
// ADDED OR MODIFIED IN NuMods 1.4.0
$hesklang['numods'] = 'NuMods';
@ -563,7 +564,6 @@ $hesklang['can_man_kb']='Manage knowledgebase';
$hesklang['can_man_users']='Manage users';
$hesklang['can_man_cat']='Manage categories';
$hesklang['can_man_canned']='Manage canned responses';
$hesklang['can_man_settings']='Manage help desk settings';
$hesklang['can_del_notes']='Delete any ticket notes';
$hesklang['dan']='users can delete their own ticket notes, select this only if you wish to allow this user to also be able to delete notes from other users';
$hesklang['in_all_cat']='in allowed categories only';

Loading…
Cancel
Save