Audited the permissions names. Permissions names are to be non plural.

This commit is contained in:
Mark Crane
2013-09-21 21:45:35 +00:00
parent 6cb84a39c7
commit 8f8fd3e3e8
93 changed files with 266 additions and 266 deletions
+4 -4
View File
@@ -36,16 +36,16 @@
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
//permission details
$apps[$x]['permissions'][0]['name'] = 'services_view';
$apps[$x]['permissions'][0]['name'] = 'service_view';
$apps[$x]['permissions'][0]['groups'][] = 'superadmin';
$apps[$x]['permissions'][1]['name'] = 'services_add';
$apps[$x]['permissions'][1]['name'] = 'service_add';
$apps[$x]['permissions'][1]['groups'][] = 'superadmin';
$apps[$x]['permissions'][2]['name'] = 'services_edit';
$apps[$x]['permissions'][2]['name'] = 'service_edit';
$apps[$x]['permissions'][2]['groups'][] = 'superadmin';
$apps[$x]['permissions'][3]['name'] = 'services_delete';
$apps[$x]['permissions'][3]['name'] = 'service_delete';
$apps[$x]['permissions'][3]['groups'][] = 'superadmin';
//schema details
+1 -1
View File
@@ -26,7 +26,7 @@
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('services_delete')) {
if (permission_exists('service_delete')) {
//access granted
}
else {
+3 -3
View File
@@ -27,7 +27,7 @@
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('services_add') || permission_exists('services_edit')) {
if (permission_exists('service_add') || permission_exists('service_edit')) {
//access granted
}
else {
@@ -90,7 +90,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//add or update the database
if ($_POST["persistformvar"] != "true") {
if ($action == "add" && permission_exists('services_add')) {
if ($action == "add" && permission_exists('service_add')) {
$service_uuid = uuid();
$sql = "insert into v_services ";
$sql .= "(";
@@ -126,7 +126,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
return;
} //if ($action == "add")
if ($action == "update" && permission_exists('services_edit')) {
if ($action == "update" && permission_exists('service_edit')) {
$sql = "update v_services set ";
$sql .= "service_name = '$service_name', ";
$sql .= "service_type = '$service_type', ";
+5 -5
View File
@@ -26,7 +26,7 @@
require_once "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('services_view')) {
if (permission_exists('service_view')) {
//access granted
}
else {
@@ -141,7 +141,7 @@ if (strlen($_GET["a"]) > 0) {
echo "<th>Status</th>\n";
echo "<th>Action</th>\n";
echo "<td align='right' width='42'>\n";
if (permission_exists('services_add')) {
if (permission_exists('service_add')) {
echo " <a href='service_edit.php' alt='add'>$v_link_label_add</a>\n";
}
echo "</td>\n";
@@ -173,10 +173,10 @@ if (strlen($_GET["a"]) > 0) {
}
echo "</td>\n";
echo " <td valign='top' align='right'>\n";
if (permission_exists('services_edit')) {
if (permission_exists('service_edit')) {
echo " <a href='service_edit.php?id=".$row[service_uuid]."' alt='edit'>$v_link_label_edit</a>\n";
}
if (permission_exists('services_delete')) {
if (permission_exists('service_delete')) {
echo " <a href='service_delete.php?id=".$row[service_uuid]."' alt='delete' onclick=\"return confirm('Do you really want to delete this?')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
@@ -193,7 +193,7 @@ if (strlen($_GET["a"]) > 0) {
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";
if (permission_exists('services_add')) {
if (permission_exists('service_add')) {
echo " <a href='service_edit.php' alt='add'>$v_link_label_add</a>\n";
}
echo " </td>\n";