Skip to content

Commit

Permalink
replaced HORTA_NO_ADMIN_USER_FLAG with NEW_HORTA_ENVIRONMENT which us…
Browse files Browse the repository at this point in the history
…ers can understand better; the flag should be true only on the first install
  • Loading branch information
Cristian Goina committed Nov 1, 2024
1 parent a2c86a5 commit e95b66d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cognito_stack/src/hortacloud-cognito.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class HortaCloudCognitoStack extends Stack {
}

const ADMIN_GROUP_NAME = "admins";
const DO_NOT_CREATE_ADMIN_USER:boolean = process.env.HORTA_NO_ADMIN_USER_FLAG?.toLowerCase() == 'true' ? true : false;
const NEW_HORTA_ENVIRONMENT:boolean = process.env.NEW_HORTA_ENVIRONMENT?.toLowerCase() == 'true' ? true : false;

class HortaCloudCognito extends Construct {

Expand Down Expand Up @@ -83,7 +83,7 @@ class HortaCloudCognito extends Construct {

// if no admin user flag is set do not create the admin user
// that should only be done if cognito users are imported from a backup
if (!DO_NOT_CREATE_ADMIN_USER) {
if (NEW_HORTA_ENVIRONMENT === true) {
this.createAdminUser();
}
}
Expand Down
2 changes: 1 addition & 1 deletion env.template
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ WORKSTATION_CACHE_DIR=

# Flag used to specify not to create an admin user
# this is used when users are imported from an existing backup
HORTA_NO_ADMIN_USER_FLAG=true
NEW_HORTA_ENVIRONMENT=true

0 comments on commit e95b66d

Please sign in to comment.