Fix permissions checks that were missed in ring_groups.php

This commit is contained in:
Mark Crane
2014-01-04 07:45:06 +00:00
parent 5afad8ad8c
commit 787205bcd5
2 changed files with 13 additions and 5 deletions

View File

@@ -27,7 +27,7 @@
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('ring_group_add')) {
if (permission_exists('ring_group_delete')) {
//access granted
}
else {

View File

@@ -119,7 +119,9 @@ require_once "resources/paging.php";
echo th_order_by('ring_group_enabled', $text['label-enabled'], $order_by, $order);
echo th_order_by('ring_group_description', $text['label-description'], $order_by, $order);
echo "<td align='right' width='42'>\n";
echo " <a href='ring_group_edit.php' alt='add'>$v_link_label_add</a>\n";
if (permission_exists('ring_group_add')) {
echo " <a href='ring_group_edit.php' alt='add'>$v_link_label_add</a>\n";
}
echo "</td>\n";
echo "<tr>\n";
@@ -136,8 +138,12 @@ require_once "resources/paging.php";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ring_group_enabled']."&nbsp;</td>\n";
echo " <td valign='top' class='".$row_style[$c]."'>".$row['ring_group_description']."&nbsp;</td>\n";
echo " <td valign='top' align='right'>\n";
echo " <a href='ring_group_edit.php?id=".$row['ring_group_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
echo " <a href='ring_group_delete.php?id=".$row['ring_group_uuid']."' alt='delete' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
if (permission_exists('ring_group_edit')) {
echo " <a href='ring_group_edit.php?id=".$row['ring_group_uuid']."' alt='edit'>$v_link_label_edit</a>\n";
}
if (permission_exists('ring_group_delete')) {
echo " <a href='ring_group_delete.php?id=".$row['ring_group_uuid']."' alt='delete' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
echo "</tr>\n";
if ($c==0) { $c=1; } else { $c=0; }
@@ -152,7 +158,9 @@ require_once "resources/paging.php";
echo " <td width='33.3%' nowrap>&nbsp;</td>\n";
echo " <td width='33.3%' align='center' nowrap>$paging_controls</td>\n";
echo " <td width='33.3%' align='right'>\n";
echo " <a href='ring_group_edit.php' alt='add'>$v_link_label_add</a>\n";
if (permission_exists('ring_group_add')) {
echo " <a href='ring_group_edit.php' alt='add'>$v_link_label_add</a>\n";
}
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";