Skip to content

Ability to DISABLE_USER_REGISTRATION  #724

Open
@chavda-bhavik

Description

@chavda-bhavik

Is your feature request related to a problem? Please describe.
If there is DISABLE_USER_REGISTRATION in env no one should be able to do signup. By signup form or using github signup.

Describe the solution you'd like
If env has DISABLE_USER_REGISTRATION set to true, user should not be able to signup. We will restrict signup request from API side by adding check to DISABLE_USER_REGISTRATION env.

Like following condition we can put into,

async register(@Body() body: RegisterUserDto, @Res() response: Response) {
,

    if (process.env.DISABLE_USER_REGISTRATION === 'true') throw new ApiException('Account creation is disabled');

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions