1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00

feat: Use environment variables for default admin configuration

This commit is contained in:
Maksim Eltyshev 2023-09-12 01:12:38 +02:00
parent 2dfa79801f
commit e59535b9b4
20 changed files with 224 additions and 121 deletions

View file

@ -61,6 +61,10 @@ module.exports = {
throw Errors.USER_NOT_FOUND;
}
if (user.email === sails.config.custom.defaultAdminEmail) {
throw Errors.USER_NOT_FOUND; // Forbidden
}
if (
inputs.id === currentUser.id &&
!bcrypt.compareSync(inputs.currentPassword, user.password)