diff options
author | Simon Rettberg | 2020-01-09 13:22:29 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-01-09 13:22:29 +0100 |
commit | 206d0b94f4010e8a5cbce74c5afbae46adf03d74 (patch) | |
tree | cf6582f68ee086727a83eddac9f5e6675a64d4ff /inc | |
parent | [inc/Taskmanager] Switch to new TCP interface (diff) | |
download | slx-admin-206d0b94f4010e8a5cbce74c5afbae46adf03d74.tar.gz slx-admin-206d0b94f4010e8a5cbce74c5afbae46adf03d74.tar.xz slx-admin-206d0b94f4010e8a5cbce74c5afbae46adf03d74.zip |
[permissionmanager] Make default roles "builtin" i.e. not modifiable
Diffstat (limited to 'inc')
-rw-r--r-- | inc/request.inc.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/inc/request.inc.php b/inc/request.inc.php index a2dc9711..6104fafd 100644 --- a/inc/request.inc.php +++ b/inc/request.inc.php @@ -6,9 +6,17 @@ class Request { + /** + * Required and not empty + */ const REQUIRED = "\0\1\2REQ\0\1\2"; /** + * Required, but might be empty + */ + const REQUIRED_EMPTY = "\0\3\4REQ\0\3\4"; + + /** * * @param string $key Key of field to get from $_GET * @param string $default Value to return if $_GET does not contain $key @@ -61,7 +69,7 @@ class Request private static function handle(&$array, $key, $default, $type) { if (!isset($array[$key])) { - if ($default === self::REQUIRED) { + if ($default === self::REQUIRED || $default === self::REQUIRED_EMPTY) { Message::addError('main.parameter-missing', $key); Util::redirect('?do=' . $_REQUEST['do']); } |