Skip to content

Commit

Permalink
fix: Allow signups when invited and in PREVENT_SIGNUP mode (#2448)
Browse files Browse the repository at this point in the history
* Allow signups when invited and in PREVENT_SIGNUP mode

* Fix prevent signup check

* Fix prevent signup check

* Fix isSignup check
  • Loading branch information
kyle-ssg authored Jul 17, 2023
1 parent bc9aac3 commit 10719eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frontend/web/components/pages/HomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ const HomePage = class extends React.Component {
? `?redirect=${Utils.fromParam().redirect}`
: ''
const isInvite = document.location.href.indexOf('invite') !== -1
const preventSignup = Project.preventSignup && !isInvite
const isSignup =
!Project.preventSignup &&
!preventSignup &&
((isInvite && document.location.href.indexOf('login') === -1) ||
document.location.href.indexOf('signup') !== -1)
const disableSignup = Project.preventSignup && isSignup
const disableSignup = preventSignup && isSignup
const preventEmailPassword = Project.preventEmailPassword
const disableForgotPassword = Project.preventForgotPassword
const oauths = []
Expand Down Expand Up @@ -380,7 +381,7 @@ const HomePage = class extends React.Component {
</AccountProvider>
</Card>

{!Project.preventSignup && (
{!preventSignup && (
<div>
{!preventEmailPassword && (
<Row className='justify-content-center mt-2'>
Expand Down

3 comments on commit 10719eb

@vercel
Copy link

@vercel vercel bot commented on 10719eb Jul 17, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 10719eb Jul 17, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

docs – ./docs

docs.bullet-train.io
docs-git-main-flagsmith.vercel.app
docs-flagsmith.vercel.app
docs.flagsmith.com

@vercel
Copy link

@vercel vercel bot commented on 10719eb Jul 17, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.