mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
introduce reset token, comment isAuthorized
This commit is contained in:
parent
095e6603ab
commit
35cc38ba7c
@ -14,6 +14,12 @@ const isAuthorized: AuthChecker<any> = async ({ context }, rights) => {
|
||||
context.role = ROLE_UNAUTHORIZED // unauthorized user
|
||||
|
||||
// moriz: I think it is better to check the INALIENABLE_RIGHTS here
|
||||
/*
|
||||
if ((<RIGHTS[]>rights).reduce(
|
||||
(acc, right) => acc && INALIENABLE_RIGHTS.includes(right),
|
||||
true,
|
||||
)) return true
|
||||
*/
|
||||
|
||||
// Do we have a token?
|
||||
if (context.token) {
|
||||
|
||||
@ -373,7 +373,7 @@ describe('UserResolver', () => {
|
||||
|
||||
describe('user is in database and wrong password', () => {
|
||||
beforeAll(async () => {
|
||||
// resetToken()
|
||||
resetToken()
|
||||
await createUser(mutate, {
|
||||
email: 'peter@lustig.de',
|
||||
firstName: 'Peter',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user