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 bf52a675a0
commit 041a375b62
93 changed files with 266 additions and 266 deletions

View File

@@ -32,14 +32,14 @@
$apps[$x]['menu'][0]['uuid'] = '148ea42a-3711-3d64-181b-07a6a3c3ed60';
$apps[$x]['menu'][0]['parent_uuid'] = '02194288-6d56-6d3e-0b1a-d53a2bc10788';
$apps[$x]['menu'][0]['category'] = 'internal';
$apps[$x]['menu'][0]['path'] = '/app/settings/settings_edit.php';
$apps[$x]['menu'][0]['path'] = '/app/settings/setting_edit.php';
$apps[$x]['menu'][0]['groups'][] = 'superadmin';
//permission details
$apps[$x]['permissions'][0]['name'] = 'settings_view';
$apps[$x]['permissions'][0]['name'] = 'setting_view';
$apps[$x]['permissions'][0]['groups'][] = 'superadmin';
$apps[$x]['permissions'][1]['name'] = 'settings_edit';
$apps[$x]['permissions'][1]['name'] = 'setting_edit';
$apps[$x]['permissions'][1]['groups'][] = 'superadmin';
//schema details

View File

@@ -27,7 +27,7 @@
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";
if (permission_exists('settings_view') || if_group("superadmin")) {
if (permission_exists('setting_view') || if_group("superadmin")) {
//access granted
}
else {
@@ -126,7 +126,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//add or update the database
if ($_POST["persistformvar"] != "true") {
if ($action == "add" && permission_exists('settings_edit')) {
if ($action == "add" && permission_exists('setting_edit')) {
$sql = "insert into v_settings ";
$sql .= "(";
$sql .= "event_socket_ip_address, ";
@@ -158,7 +158,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
save_setting_xml();
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=settings_edit.php\">\n";
echo "<meta http-equiv=\"refresh\" content=\"2;url=setting_edit.php\">\n";
echo "<div align='center'>\n";
echo "Add Complete\n";
echo "</div>\n";
@@ -166,7 +166,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
return;
} //if ($action == "add")
if ($action == "update" && permission_exists('settings_edit')) {
if ($action == "update" && permission_exists('setting_edit')) {
$sql = "update v_settings set ";
$sql .= "event_socket_ip_address = '$event_socket_ip_address', ";
$sql .= "event_socket_port = '$event_socket_port', ";
@@ -184,7 +184,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
save_setting_xml();
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=settings_edit.php\">\n";
echo "<meta http-equiv=\"refresh\" content=\"2;url=setting_edit.php\">\n";
echo "<div align='center'>\n";
echo "Update Complete\n";
echo "</div>\n";
@@ -453,7 +453,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo $text['description-shout-volume']."\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('settings_edit')) {
if (permission_exists('setting_edit')) {
echo " <tr>\n";
echo " <td colspan='2' align='right'>\n";
echo " <input type='submit' name='submit' class='btn' value='Save'>\n";