mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
parent
0dc24ffafd
commit
5e8027f5d6
10 changed files with 80 additions and 46 deletions
|
@ -1,6 +1,9 @@
|
|||
const zxcvbn = require('zxcvbn');
|
||||
|
||||
const Errors = {
|
||||
NOT_ENOUGH_RIGHTS: {
|
||||
notEnoughRights: 'Not enough rights',
|
||||
},
|
||||
EMAIL_ALREADY_IN_USE: {
|
||||
emailAlreadyInUse: 'Email already in use',
|
||||
},
|
||||
|
@ -56,6 +59,9 @@ module.exports = {
|
|||
},
|
||||
|
||||
exits: {
|
||||
notEnoughRights: {
|
||||
responseType: 'forbidden',
|
||||
},
|
||||
emailAlreadyInUse: {
|
||||
responseType: 'conflict',
|
||||
},
|
||||
|
@ -65,6 +71,10 @@ module.exports = {
|
|||
},
|
||||
|
||||
async fn(inputs) {
|
||||
if (sails.config.custom.oidcEnforced) {
|
||||
throw Errors.NOT_ENOUGH_RIGHTS;
|
||||
}
|
||||
|
||||
const values = _.pick(inputs, [
|
||||
'email',
|
||||
'password',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue