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

Auto-enable early access flag for users in non-production environments #412

Merged
merged 12 commits into from
Feb 3, 2025

Conversation

sundayonah
Copy link
Collaborator

@sundayonah sundayonah commented Feb 3, 2025

Automatically sets the has_early_access flag to true when creating new users in non-production environments, while maintaining the default false value in production.
This change simplifies testing of early access features in development and staging environments by eliminating the need for manual database updates.

Changes

  • Modified user creation logic in Register controller to conditionally set has_early_access
  • Updated user creation builder to set has_early_access to true in non-production
  • Added test coverage in auth_test.go to verify the behavior

Testing

  • Verified new user registration sets has_early_access=true in development
  • Verified new user registration keeps has_early_access=false in production
  • Added unit tests to cover both scenarios
  • Manual testing completed in development environment

closes #402

@sundayonah
Copy link
Collaborator Author

Automatically sets the has_early_access flag to true when creating new users in non-production environments, while maintaining the default false value in production. This change simplifies testing of early access features in development and staging environments by eliminating the need for manual database updates.

Changes

  • Modified user creation logic in Register controller to conditionally set has_early_access
  • Updated user creation builder to set has_early_access to true in non-production
  • Added test coverage in auth_test.go to verify the behavior

Testing

  • Verified new user registration sets has_early_access=true in development
  • Verified new user registration keeps has_early_access=false in production
  • Added unit tests to cover both scenarios
  • Manual testing completed in development environment

@sundayonah sundayonah closed this Feb 3, 2025
@sundayonah sundayonah reopened this Feb 3, 2025
Copy link
Contributor

@chibie chibie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert all changes to the config/server.go file

controllers/accounts/auth_test.go Outdated Show resolved Hide resolved
config/server.go Outdated Show resolved Hide resolved
config/server.go Outdated Show resolved Hide resolved
config/server.go Outdated Show resolved Hide resolved
Copy link
Contributor

@chibie chibie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chibie chibie merged commit b082481 into main Feb 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants