mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-26 14:40:57 +03:00
Fixed bug that prevented registration from occuring
This commit is contained in:
@@ -82,7 +82,7 @@ exports.registerUser = function(req, res) {
|
||||
var username = req.body.username;
|
||||
var plaintextPassword = req.body.password;
|
||||
|
||||
if (userid !== 'admin' && !config_api.getConfigItem('ytdl_allow_registration')) {
|
||||
if (userid !== 'admin' && !config_api.getConfigItem('ytdl_allow_registration') && !req.isAuthenticated() && (!req.user || !exports.userHasPermission(req.user.uid, 'settings'))) {
|
||||
res.sendStatus(409);
|
||||
logger.error(`Registration failed for user ${userid}. Registration is disabled.`);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user