Skip to content

Commit

Permalink
chore: swap conditional to env var
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderleegs committed Jul 19, 2023
1 parent 4c63682 commit b26ab91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .env-example
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ export PERSONAL_ACCESS_TOKEN=''
export USERNAME=''

# GitGuardian
export GITGUARDIAN_API_KEY=""
export GITGUARDIAN_API_KEY=""

export REACT_APP_IS_SITE_PRIVATISATION_ACTIVE=false
6 changes: 4 additions & 2 deletions src/hooks/settingsHooks/useGetSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ export const useGetSettings = (
async () => {
const siteSettings = await SettingsService.get({ siteName })
let passwordSettings
const isLaunchDarklyImplemented = false
if (shouldGetPrivacyDetails && isLaunchDarklyImplemented) {
if (
shouldGetPrivacyDetails &&
process.env.REACT_APP_IS_SITE_PRIVATISATION_ACTIVE
) {
// TODO: LaunchDarkly to allow specific groups to access this feature first
passwordSettings = await SettingsService.getPassword({ siteName })
} else {
Expand Down

0 comments on commit b26ab91

Please sign in to comment.