Skip to content

Commit e7e7ecf

Browse files
committed
disable user creation
1 parent 51db2d5 commit e7e7ecf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/users/ldapusers.service.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,7 @@ export class LdapUsersService implements UsersService {
9898
}
9999

100100
async create(createUserDto: CreateUserDto): Promise<UserLoginResponseDto> {
101-
// lookup user in LDAP
102-
const ldapEntry = await this.findUserInLdap(createUserDto.email);
103-
const userData = await this.createUserFromLdapEntry(ldapEntry);
104-
105-
return new UserLoginResponseDto(userData, null);
101+
throw new HttpException('User creation is disabled. Use your LDAP-Credentials to login.', HttpStatus.BAD_REQUEST);
106102
}
107103

108104
async findOne(id: string): Promise<User> {

0 commit comments

Comments
 (0)