Add new device permissions device_username_password, device_alternate, device_enable.
This commit is contained in:
parent
e888f1d1ff
commit
722e442703
|
|
@ -105,6 +105,15 @@
|
|||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'device_domain';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'device_username_password';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'device_alternate';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = "device_profile_view";
|
||||
$apps[$x]['permissions'][$y]['groups'][] = "admin";
|
||||
|
|
@ -127,6 +136,11 @@
|
|||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'device_all';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$y++;
|
||||
$apps[$x]['permissions'][$y]['name'] = 'device_enable';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
|
||||
$apps[$x]['permissions'][$y]['groups'][] = 'admin';
|
||||
$y++;
|
||||
|
||||
//schema details
|
||||
$y = 0; //table array index
|
||||
|
|
|
|||
|
|
@ -590,6 +590,7 @@ require_once "resources/require.php";
|
|||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if (permission_exists('device_line_view') {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell' valign='top'>".$text['label-lines']."</td>";
|
||||
echo " <td class='vtable' align='left'>";
|
||||
|
|
@ -713,8 +714,9 @@ require_once "resources/require.php";
|
|||
}
|
||||
echo " </td>";
|
||||
echo " </tr>";
|
||||
}
|
||||
|
||||
if (permission_exists('device_key_add') || permission_exists('device_key_edit')) {
|
||||
if (permission_exists('device_profile_edit')) {
|
||||
//device profile
|
||||
$sql = "select * from v_device_profiles ";
|
||||
$sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) ";
|
||||
|
|
@ -764,6 +766,7 @@ require_once "resources/require.php";
|
|||
echo " </tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_profile_view')) {
|
||||
$x = 0;
|
||||
foreach($device_keys as $row) {
|
||||
//set the column names
|
||||
|
|
@ -1063,9 +1066,10 @@ require_once "resources/require.php";
|
|||
echo " </td>";
|
||||
echo " </tr>";
|
||||
}
|
||||
}
|
||||
|
||||
//device settings
|
||||
if (permission_exists('device_setting_add')) {
|
||||
if (permission_exists('device_setting_edit')) {
|
||||
echo " <tr>";
|
||||
echo " <td class='vncell' valign='top'>".$text['label-settings']."</td>";
|
||||
echo " <td class='vtable' align='left'>";
|
||||
|
|
@ -1153,6 +1157,7 @@ require_once "resources/require.php";
|
|||
echo " </tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_username_password')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-device']."\n";
|
||||
|
|
@ -1165,7 +1170,9 @@ require_once "resources/require.php";
|
|||
echo $text['description-device']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_alternate')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-device_uuid_alternate']."\n";
|
||||
|
|
@ -1189,6 +1196,7 @@ require_once "resources/require.php";
|
|||
echo $text['description-device_uuid_alternate']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
|
|
@ -1253,6 +1261,7 @@ require_once "resources/require.php";
|
|||
echo " <input type='hidden' name='domain_uuid' id='domain_uuid' value=\"".$_SESSION['domain_uuid']."\">\n";
|
||||
}
|
||||
|
||||
if (permission_exists('device_enable')) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-device_provision_enable']."\n";
|
||||
|
|
@ -1276,6 +1285,7 @@ require_once "resources/require.php";
|
|||
echo $text['description-device_provision_enable']."\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue