Created
February 18, 2018 14:55
-
-
Save ImreC/901ec66f3d6a6ec3707d9f51e510cddc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before: { | |
all: [], | |
find: [ authenticate('jwt') ], | |
get: [ authenticate('jwt') ], | |
create: [ | |
hashPassword(), | |
verifyHooks.addVerification() | |
], | |
update: [ | |
commonHooks.disallow('external') | |
], | |
patch: [ | |
commonHooks.iff( | |
commonHooks.isProvider('external'), | |
commonHooks.preventChanges( | |
'email', | |
'isVerified', | |
'verifyToken', | |
'verifyShortToken', | |
'verifyExpires', | |
'verifyChanges', | |
'resetToken', | |
'resetShortToken', | |
'resetExpires' | |
), | |
hashPassword(), | |
authenticate('jwt') | |
) | |
], | |
remove: [ authenticate('jwt') ] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment