private boolean allFeaturesAreEnabled(String[] featureKeys) { for (String featureKey : featureKeys) { if (!darkFeatureManager.isFeatureEnabledForCurrentUser(featureKey)) { return false; } } return true; } }
/** * Returns true if legacy XSRF mode is active, otherwise returns false. * * @since 3.0.0 * @deprecated Only provided for legacy reasons, will be removed in 4.0.0 */ @VisibleForTesting @Deprecated boolean inLegacyXsrfMode() { return darkFeatureManager.isFeatureEnabledForAllUsers(LEGACY_FEATURE_KEY); }
@Override public EnabledDarkFeatures getFeaturesEnabledForAllUsers() { return new EnabledDarkFeaturesBuilder() .unmodifiableFeaturesEnabledForAllUsers(coreProperties) .build(); }
private void enableFeature(@Nonnull ApplinksFeatures feature) { darkFeatureManager.enableFeatureForAllUsers(feature.featureKey); }
private void disableFeature(@Nonnull ApplinksFeatures feature) { darkFeatureManager.disableFeatureForAllUsers(feature.featureKey); }
public boolean hasPermission(final UserKey userKey) { // Allow the sysadmin condition to be bypassed by a dark feature // This enables us to use the event reporter when sysadmin permissions may not be accessible, e.g. in OnDemand instances return userPermissionsHelper.isUserSystemAdmin(userKey) || darkFeatureManager.isFeatureEnabledForUser(userKey, DARK_FEATURE_KEY); } }
private void assertFeatureDisabled(final EnabledDarkFeatures enabledDarkFeatures) { assertFalse("Feature key '" + DISABLED_FEATURE + "' must be disabled; found: " + enabledDarkFeatures, enabledDarkFeatures.isFeatureEnabled(DISABLED_FEATURE)); }
@Override public boolean isEnabled() { return this.darkFeatureManager.isFeatureEnabledForCurrentUser(DARK_FEATURE_PROGRAMMATIC_ANALYTICS); } }
@Override public boolean isInviteToHipChatEnabled() { return !darkFeatureManager.isFeatureEnabledForAllUsers(HIPCHAT_INVITE_DISABLED); } }
@Test(expected = InvalidFeatureKeyException.class) public void invalidFeatureKeyNotEnabledForAllUsers() { darkFeatureManager.enableFeatureForAllUsers(INVALID_FEATURE_KEY); }
@Test(expected = InvalidFeatureKeyException.class) public void invalidFeatureKeyNotDisabledForAllUsers() { darkFeatureManager.disableFeatureForAllUsers(INVALID_FEATURE_KEY); }
@Override public boolean isEnabled() { return featureManager.isFeatureEnabledForCurrentUser(DARK_FEATURE_PROGRAMMATIC_ANALYTICS); } }
/** * This flag decides if we should generate Protobuf derived Plugin modules as well as ModuleDescriptors. This method * allows fallback between the "vertigo ready" and old (deprecated) way of generating module descriptors at installation * time. * @return Whether or not to generate ModulDescriptors using the "vertigo ready" path or not. */ public boolean isVertigoSpiEnabled() { return !darkFeatureManager.isFeatureEnabledForAllUsers(DARKFEATURE_VERTIGO_SPI_DISABLED_KEY); } }
public boolean isFeatureEnabledForCurrentUser(String key) { return darkFeatureManager.isFeatureEnabledForCurrentUser(key); } }
@Override protected boolean isConditionTrue() { return darkFeatureManager.isFeatureEnabledForAllUsers(ACJS_VERSION_FEATURE_FLAG); }
private boolean impersonationIsEnabled() { return !darkFeatureManager.isFeatureEnabledForCurrentUser(DARK_FEATURE_DISABLE_OAUTH2_IMPERSONATION); }
public boolean isHipChatSystemUserEnabled() { return darkFeatureManager.isFeatureEnabledForAllUsers(HIPCHAT_SYSTEM_USER_ENABLED); }
private boolean impersonationIsEnabled() { return !darkFeatureManager.isFeatureEnabledForCurrentUser(DARK_FEATURE_DISABLED_OAUTH2_IMPERSONATION); }
/** * This method returns true if Atlasian Connect should start up in a Vertigo way. This includes no database calls * without a tenant and no OSGI registrations. * @return true if vertigo style startup is enabled. */ public boolean isVertigoStartupEnabled() { return isVertigoInstance() || darkFeatureManager.isFeatureEnabledForAllUsers(VERTIGO_STARTUP_ENABLED_KEY); }
private boolean i18nSupportIsEnabled() { return systemPropertyService.isDevMode() || darkFeatureManager.isFeatureEnabledForAllUsers(I18N_DARK_FEATURE); } }