mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 09:34:39 +00:00
make user-config-readonly explicit when writing to config.
This commit is contained in:
parent
687097ab71
commit
dcd71445c0
@ -153,6 +153,8 @@ function write_config($desc = 'Unknown', $backup = true)
|
||||
$user = getUserEntry($_SESSION['Username']);
|
||||
if (is_array($user) && userHasPrivilege($user, "user-config-readonly")) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user