Merge branch 'mayank' of http://git.wdipl.com/Mayank.Mishra/MinglarBackendNestJS into paritosh
This commit is contained in:
@@ -35,7 +35,7 @@ export const handler = safeHandler(async (
|
||||
});
|
||||
|
||||
if(!user || ![ROLE.MINGLAR_ADMIN, ROLE.CO_ADMIN, ROLE.ACCOUNT_MANAGER].includes(user.roleXid)){
|
||||
throw new ApiError(404, 'You are not allowed to register directly. Please contact minglar admin.');
|
||||
throw new ApiError(403, 'You are not allowed to register directly. Please contact minglar admin.');
|
||||
}
|
||||
|
||||
if (user && user.userPassword) {
|
||||
|
||||
@@ -121,7 +121,7 @@ export class MinglarService {
|
||||
}
|
||||
console.log(existingUser.roleXid);
|
||||
|
||||
if (existingUser.roleXid !== ROLE.MINGLAR_ADMIN || existingUser.roleXid !== ROLE.CO_ADMIN || existingUser.roleXid !== ROLE.ACCOUNT_MANAGER) {
|
||||
if (existingUser.roleXid !== ROLE.MINGLAR_ADMIN && existingUser.roleXid !== ROLE.CO_ADMIN && existingUser.roleXid !== ROLE.ACCOUNT_MANAGER) {
|
||||
throw new ApiError(403, 'Access denied.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user