mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-06-07 00:47:00 +03:00
Create option to not allow a normal user to add zones
This commit is contained in:
parent
4881858d68
commit
00c40c047e
3 changed files with 15 additions and 6 deletions
|
@ -227,6 +227,9 @@ if ($action == "list" or $action== "listslaves") {
|
|||
usort($return, "zonesort");
|
||||
jtable_respond($return);
|
||||
} elseif ($action == "create") {
|
||||
if (is_adminuser() !== TRUE or ($allowzoneadd !== TRUE)) {
|
||||
jtable_respond(null, 'error', "You are not allowed to add zones");
|
||||
}
|
||||
if (_valid_label($_POST['name']) === FALSE) {
|
||||
jtable_respond(null, 'error', "Please only use [a-z0-9_/.-]");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue