Commit dcd71445 authored by Ad Schellevis's avatar Ad Schellevis

make user-config-readonly explicit when writing to config.

parent 687097ab
...@@ -153,6 +153,8 @@ function write_config($desc = 'Unknown', $backup = true) ...@@ -153,6 +153,8 @@ function write_config($desc = 'Unknown', $backup = true)
$user = getUserEntry($_SESSION['Username']); $user = getUserEntry($_SESSION['Username']);
if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) { if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) {
session_write_close(); session_write_close();
// okay, it's not very nice to check permissions here, but let's make it explicit while we do...
log_error(gettext("WARNING: User")." ".$_SESSION['Username']." ".gettext("may not write config (user-config-readonly set)"));
return false; return false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment