diff --git a/app/phrases/app_config.php b/app/phrases/app_config.php index b8ef8fd0e7..8fe3fa4c6c 100644 --- a/app/phrases/app_config.php +++ b/app/phrases/app_config.php @@ -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++; diff --git a/app/phrases/phrase_edit.php b/app/phrases/phrase_edit.php index c83d212965..102c10d00a 100644 --- a/app/phrases/phrase_edit.php +++ b/app/phrases/phrase_edit.php @@ -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