Skip to content
Snippets Groups Projects

feat: feature flags for production environment

Merged Sjoerd requested to merge feat/featureFlags into main
1 unresolved thread

This MR contains feature variables for released visualizations, insight sharing, sharable explorations and management of user permissions for the production environment.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 // Safely retrieve environment variable values with a default fallback
2 const getEnvVariable = (key: string, defaultValue: string = 'false'): string => {
3 return import.meta.env[key] ?? defaultValue;
4 };
5
6 // Check if the environment is production
7 const isProduction = (): boolean => {
8 return getEnvVariable('GRAPHPOLARIS_VERSION', 'dev') === 'prod';
9 };
10
11 // Check if the Manage Permissions feature is enabled
12 const showManagePermissions = (): boolean => {
13 return !isProduction() || (isProduction() && getEnvVariable('WIP_VIEWER_PERMISSIONS') === 'false');
  • Leonardo Christino approved this merge request

    approved this merge request

  • added 4 commits

    • 04f5a876 - 1 commit from branch main
    • 4bf449bf - feat(featureFlags): setting up feature flags for production
    • 576fd002 - feat(featureFlags): centralized logic
    • bb079ffc - feat(featureFlags): null value safety

    Compare with previous version

  • Leonardo Christino enabled an automatic merge when all merge checks for bb079ffc pass

    enabled an automatic merge when all merge checks for bb079ffc pass

  • :tada: This MR is included in version 1.91.0 :tada:

    The release is available on GitLab release.

    Your semantic-release bot :package: :rocket:

  • Please register or sign in to reply
    Loading