Skip to content

Conversation

ChaosDMG
Copy link
Contributor

@ChaosDMG ChaosDMG commented Mar 18, 2024

The api already work this way. You can sign up if EnableAccountCreation is true or if you have a valid token linked to an organization. Currently the frontend wont submit when you enter with a token if EnableAccountCreation is false.

Here is the relevant api logic:

private async Task<bool> IsAccountCreationEnabledAsync(string? token)
{
    if (_authOptions.EnableAccountCreation)
        return true;`

     if (String.IsNullOrEmpty(token))
        return false;

    var organization = await _organizationRepository.GetByInviteTokenAsync(token);
    return organization is not null;
}

@CLAassistant
Copy link

CLAassistant commented Mar 18, 2024

CLA assistant check
All committers have signed the CLA.

@ChaosDMG ChaosDMG changed the title Allow users to signup with ENABLE_ACCOUNT_CREATION false. Account creation with token and AccountCreation false Mar 18, 2024
@niemyjski niemyjski merged commit 4b5a0a4 into exceptionless:main Mar 21, 2024
@niemyjski
Copy link
Member

Thanks for the PR!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants