Skip to content

Commit

Permalink
disable sign up (functional ENV flag)
Browse files Browse the repository at this point in the history
The ENV var needed to be mapped in www_env.ejs to be seen by the
frontend component
  • Loading branch information
bkiahstroud committed Sep 18, 2024
1 parent 2dbc7f4 commit 2d5ccb8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ RAILS_DB_PORT=5432
RAILS_DB_NAME=manifold_production
RAILS_REDIS_URL=redis://redis:6379

REACT_APP_ALLOW_SIGNUP=true
ALLOW_SIGNUP=false
1 change: 1 addition & 0 deletions chart/princeton-manifold/templates/configmap-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
data:
ALLOW_SIGNUP: "false"
API_CABLE_HOST: princeton-manifold-production-api-cable
API_CABLE_PORT: "3021"
API_HOST: princeton-manifold-production-api-rails
Expand Down
2 changes: 1 addition & 1 deletion client/src/global/components/sign-in-up/LoginForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function LoginForm({
hideOverlay,
willRedirect
}) {
const signupEnabled = process.env.REACT_APP_ALLOW_SIGNUP === 'true';
const signupEnabled = process.env.ALLOW_SIGNUP === 'true';
const { t } = useTranslation();
const dispatch = useDispatch();
const authentication = useFromStore("authentication");
Expand Down
1 change: 1 addition & 0 deletions client/webpack/templates/www_env.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ process.env.DOMAIN = "<%= env.DOMAIN %>"
process.env.CLIENT_BROWSER_API_URL = "<%= env.CLIENT_BROWSER_API_URL %>"
process.env.CLIENT_BROWSER_API_CABLE_URL = "<%= env.CLIENT_BROWSER_API_CABLE_URL %>"
process.env.SSL_ENABLED = "<%= env.SSL_ENABLED %>"
process.env.ALLOW_SIGNUP = "<%= env.ALLOW_SIGNUP %>"
process.version = "<%= process.version %>"

0 comments on commit 2d5ccb8

Please sign in to comment.