Removed meta lockdown checks, they're only used once anyway.
This commit is contained in:
parent
818a8a9ade
commit
885b76fce3
4 changed files with 4 additions and 16 deletions
|
@ -15,9 +15,6 @@ collation = utf8mb4_bin
|
|||
host = 127.0.0.1
|
||||
prefix = msz:
|
||||
|
||||
[Auth]
|
||||
prevent_registration = false
|
||||
|
||||
[Site]
|
||||
name = Misuzu
|
||||
description = Describe your description.
|
||||
|
|
|
@ -292,7 +292,7 @@ MIG;
|
|||
|
||||
$misuzuBypassLockdown = !empty($misuzuBypassLockdown);
|
||||
|
||||
if (!$misuzuBypassLockdown && $app->underLockdown()) {
|
||||
if (!$misuzuBypassLockdown && boolval(config_get_default(false, 'Auth', 'lockdown'))) {
|
||||
http_response_code(503);
|
||||
echo tpl_render('auth.lockdown');
|
||||
exit;
|
||||
|
|
|
@ -51,7 +51,9 @@ if (!array_key_exists($settingsMode, $settingsModes)) {
|
|||
|
||||
$settingsErrors = [];
|
||||
|
||||
$disableAccountOptions = !MSZ_DEBUG && $app->disableRegistration();
|
||||
$disableAccountOptions = !MSZ_DEBUG
|
||||
&& boolval(config_get_default(false, 'Private', 'enabled'))
|
||||
&& boolval(config_get_default(false, 'Private', 'disable_account_settings'));
|
||||
$avatarFileName = "{$settingsUserId}.msz";
|
||||
$avatarProps = $app->getAvatarProps();
|
||||
$backgroundProps = $app->getBackgroundProps();
|
||||
|
|
|
@ -116,17 +116,6 @@ final class Application
|
|||
];
|
||||
}
|
||||
|
||||
public function underLockdown(): bool
|
||||
{
|
||||
return boolval(config_get_default(false, 'Auth', 'lockdown'));
|
||||
}
|
||||
|
||||
public function disableRegistration(): bool
|
||||
{
|
||||
return $this->underLockdown()
|
||||
|| boolval(config_get_default(false, 'Private', 'enabled'));
|
||||
}
|
||||
|
||||
// used in some of the user functions still, fix that
|
||||
public static function getInstance(): Application
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue