Phrases add permission (#5258)

* Update app_config.php
* Update phrase_edit.php
This commit is contained in:
agree 2020-05-09 00:11:48 -04:00 committed by GitHub
parent f2532060a8
commit 2371f0e64d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -67,6 +67,9 @@
$apps[$x]['permissions'][$y]['groups'][] = "admin";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "phrase_execute";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "phrase_domain";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;

View File

@ -133,6 +133,10 @@
$array['phrases'][0]['phrase_description'] = $phrase_description;
if ($_POST['phrase_detail_function'] != '') {
if ($_POST['phrase_detail_function'] == 'execute' && substr($_POST['phrase_detail_data'], 0,5) != "sleep" && !permission_exists("phrase_execute")) {
header("Location: phrase_edit.php");
exit;
}
$_POST['phrase_detail_tag'] = 'action'; // default, for now
$_POST['phrase_detail_group'] = "0"; // one group, for now
@ -188,6 +192,10 @@
$array['phrases'][0]['phrase_description'] = $phrase_description;
if ($_POST['phrase_detail_function'] != '') {
if ($_POST['phrase_detail_function'] == 'execute' && substr($_POST['phrase_detail_data'], 0,5) != "sleep" && !permission_exists("phrase_execute")) {
header("Location: phrase_edit.php?id=".$phrase_uuid);
exit;
}
$_POST['phrase_detail_tag'] = 'action'; // default, for now
$_POST['phrase_detail_group'] = "0"; // one group, for now