Add a way to disable/enable users (#3056)

If you want to block users without deleting their account, you can now
disable them from the interface.
This commit is contained in:
Alexis Degrugillier
2020-06-14 19:50:09 +02:00
committed by GitHub
parent 6edbeaaf6a
commit caeb660f29
28 changed files with 94 additions and 19 deletions

View File

@@ -157,6 +157,10 @@ function authorizationToUser() {
Minz_Log::warning('Invalid API user ' . $user . ': configuration cannot be found.');
unauthorized();
}
if (!FreshRSS_Context::$user_conf->enabled) {
Minz_Log::warning('Invalid API user ' . $user . ': configuration cannot be found.');
unauthorized();
}
if ($headerAuthX[1] === sha1(FreshRSS_Context::$system_conf->salt . $user . FreshRSS_Context::$user_conf->apiPasswordHash)) {
return $user;
} else {