create omnivore_admin role and allow omnivore_admin to delete all users

This commit is contained in:
Hongbo Wu
2023-10-25 14:36:15 +08:00
parent dddb51f7d5
commit e6f378f8fe
3 changed files with 40 additions and 1 deletions

View File

@ -23,12 +23,16 @@ describe('User Service Router', () => {
email: 'user_1@omnivore.app',
status: StatusType.Deleted,
updatedAt: new Date(Date.now() - 1000 * 60 * 60 * 24 * 2), // 2 days ago
source: 'GOOGLE',
sourceUserId: '123',
},
{
name: 'user_2',
email: 'user_2@omnivore.app',
status: StatusType.Deleted,
updatedAt: new Date(Date.now() - 1000 * 60 * 60 * 24 * 2), // 2 days ago
source: 'GOOGLE',
sourceUserId: '456',
},
])
toDeleteUserIds = users.map((u) => u.id)
@ -50,7 +54,7 @@ describe('User Service Router', () => {
}
await request
.post('/api/user/cleanup?token=' + token)
.post('/svc/pubsub/user/cleanup?token=' + token)
.send(data)
.expect(200)