Skip to content
Snippets Groups Projects
Commit 7129e753 authored by Peter Rotich's avatar Peter Rotich
Browse files

Add 2 new permission settings for groups.

1) Ability to limit who can post a reply
2) Expanded staff's stats view.
parent 9a396467
No related branches found
No related tags found
No related merge requests found
......@@ -209,6 +209,8 @@ class Group {
.', can_ban_emails='.db_input($vars['can_ban_emails'])
.', can_manage_premade='.db_input($vars['can_manage_premade'])
.', can_manage_faq='.db_input($vars['can_manage_faq'])
.', can_post_ticket_reply='.db_input($vars['can_post_ticket_reply'])
.', can_view_staff_stats='.db_input($vars['can_view_staff_stats'])
.', notes='.db_input($vars['notes']);
if($id) {
......
......@@ -302,7 +302,7 @@ class Staff {
function canEditTickets() {
return ($this->ht['can_edit_tickets']);
}
function canDeleteTickets() {
return ($this->ht['can_delete_tickets']);
}
......@@ -311,6 +311,14 @@ class Staff {
return ($this->ht['can_close_tickets']);
}
function canPostReply() {
return ($this->ht['can_post_ticket_reply']);
}
function canViewStaffStats() {
return ($this->ht['can_view_staff_stats']);
}
function canAssignTickets() {
return ($this->ht['can_assign_tickets']);
}
......
......@@ -76,6 +76,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
&nbsp;&nbsp;<i>Ability to edit tickets.</i>
</td>
</tr>
<tr><td>Can <b>Post Reply</b></td>
<td>
<input type="radio" name="can_post_ticket_reply" value="1" <?php echo $info['can_post_ticket_reply']?'checked="checked"':''; ?> />Yes
&nbsp;&nbsp;
<input type="radio" name="can_post_ticket_reply" value="0" <?php echo !$info['can_post_ticket_reply']?'checked="checked"':''; ?> />No
&nbsp;&nbsp;<i>Ability to post a ticket reply.</i>
</td>
</tr>
<tr><td>Can <b>Close</b> Tickets</td>
<td>
<input type="radio" name="can_close_tickets" value="1" <?php echo $info['can_close_tickets']?'checked="checked"':''; ?> />Yes
......@@ -105,7 +113,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
<input type="radio" name="can_delete_tickets" value="1" <?php echo $info['can_delete_tickets']?'checked="checked"':''; ?> />Yes
&nbsp;&nbsp;
<input type="radio" name="can_delete_tickets" value="0" <?php echo !$info['can_delete_tickets']?'checked="checked"':''; ?> />No
&nbsp;&nbsp;<i>Deleted tickets can't be recovered!</i>
&nbsp;&nbsp;<i>Ability to delete tickets (Deleted tickets can't be recovered!)</i>
</td>
</tr>
<tr><td>Can Ban Emails</td>
......@@ -132,6 +140,14 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
&nbsp;&nbsp;<i>Ability to add/update/disable/delete knowledgebase categories and FAQs.</i>
</td>
</tr>
<tr><td>Can View Staff Stats.</td>
<td>
<input type="radio" name="can_view_staff_stats" value="1" <?php echo $info['can_view_staff_stats']?'checked="checked"':''; ?> />Yes
&nbsp;&nbsp;
<input type="radio" name="can_view_staff_stats" value="0" <?php echo !$info['can_view_staff_stats']?'checked="checked"':''; ?> />No
&nbsp;&nbsp;<i>Ability to view stats of other staff members in allowed departments.</i>
</td>
</tr>
<tr>
<th colspan="2">
<em><strong>Department Access</strong>: Check all departments the group members are allowed to access.&nbsp;&nbsp;&nbsp;<a id="selectAll" href="#deptckb">Select All</a>&nbsp;&nbsp;<a id="selectNone" href="#deptckb">Select None</a>&nbsp;&nbsp;</em>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment