1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-20 13:49:43 +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 a34d8e9753
commit 91bc889fed
20 changed files with 224 additions and 121 deletions

View file

@ -59,6 +59,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)