Removed whitelist
This commit is contained in:
parent
7081fa046e
commit
c0fbf59856
@ -5,7 +5,6 @@ import { Service } from "typedi";
|
||||
import AuthService, { IUserJwtPayload } from "@Services/common/AuthService/AuthService";
|
||||
|
||||
import IdNotService from "@Services/common/IdNotService/IdNotService";
|
||||
import WhitelistService from "@Services/common/WhitelistService/WhitelistService";
|
||||
import User from "le-coffre-resources/dist/Admin";
|
||||
import UsersService from "@Services/super-admin/UsersService/UsersService";
|
||||
import SubscriptionsService from "@Services/admin/SubscriptionsService/SubscriptionsService.ts";
|
||||
@ -16,7 +15,7 @@ import { EType } from "le-coffre-resources/dist/Admin/Subscription";
|
||||
@Controller()
|
||||
@Service()
|
||||
export default class UserController extends ApiController {
|
||||
constructor(private authService: AuthService, private idNotService: IdNotService, private whitelistService: WhitelistService, private userService: UsersService, private subscriptionsService: SubscriptionsService, private seatsService: SeatsService) {
|
||||
constructor(private authService: AuthService, private idNotService: IdNotService, private userService: UsersService, private subscriptionsService: SubscriptionsService, private seatsService: SeatsService) {
|
||||
super();
|
||||
}
|
||||
|
||||
@ -104,17 +103,17 @@ export default class UserController extends ApiController {
|
||||
}
|
||||
|
||||
//Check if user is whitelisted
|
||||
const isWhitelisted = await this.whitelistService.getByEmail(userHydrated.contact!.email);
|
||||
// const isWhitelisted = await this.whitelistService.getByEmail(userHydrated.contact!.email);
|
||||
|
||||
|
||||
//When we'll switch to idNotId whitelisting
|
||||
// const isWhitelisted = await this.userWhitelistService.getByIdNotId(user.idNot);
|
||||
|
||||
//If not whitelisted, return 409 Not whitelisted
|
||||
if (!isWhitelisted || isWhitelisted.length === 0) {
|
||||
this.httpNotWhitelisted(response);
|
||||
return;
|
||||
}
|
||||
// if (!isWhitelisted || isWhitelisted.length === 0) {
|
||||
// this.httpNotWhitelisted(response);
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
await this.idNotService.updateOffice(user.office_uid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user