Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account creation with token and AccountCreation false #1525

Merged
merged 1 commit into from
Mar 21, 2024

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
4 of 6 checks passed
@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