Interface DarkFeatureService

All Known Implementing Classes:
DefaultDarkFeatureService

@Internal public interface DarkFeatureService
An interface that indicates which features are on or off. These can come from system properties or configurable Dark Features.
Since:
5.9
  • Field Details

  • Method Details

    • isCloudExportEnabled

      boolean isCloudExportEnabled()
      Check if export for cloud is enabled (mainly view is available for users)
      Returns:
      is export for cloud enabled
    • isSimplifiedPlanConfigEnabled

      boolean isSimplifiedPlanConfigEnabled()
      Check whether the simplified plan configuration is enabled.
      Returns:
      is the simplified plan configuration enabled.
    • isViewConfigurationPermissionDisabled

      @Deprecated boolean isViewConfigurationPermissionDisabled()
      Deprecated.
      since 10.0 returns false
      Is VIEW_CONFIGURATION permission disabled.
    • isAtlassianAccountEnabled

      boolean isAtlassianAccountEnabled()
      Whether user profiles are managed by Atlassian Account
      Returns:
      is Atlassian Account enabled or not
    • isImprovedAdminPanelNav

      boolean isImprovedAdminPanelNav()
      Whether improved navigation in administration panel is enabled.
    • enableFeatureForCurrentUser

      void enableFeatureForCurrentUser(@NotNull @NotNull String featureKey)
      Enable a given feature for the current user.
      Parameters:
      featureKey - the feature key to be enabled.
      Throws:
      IllegalArgumentException - if the current user is not logged in.
    • enableFeatureForUser

      void enableFeatureForUser(@NotNull @NotNull String featureKey, @NotNull @NotNull com.atlassian.user.User user)
      Enable a given feature for a given user.
      Parameters:
      featureKey - the feature key to be enabled.
      user - the user for which the feature should be enabled.
      Throws:
      org.acegisecurity.AccessDeniedException - if the current user is not an admin.
    • disableFeatureForCurrentUser

      void disableFeatureForCurrentUser(@NotNull @NotNull String featureKey)
      Disable a given feature for the current user.
      Parameters:
      featureKey - the feature key to be enabled.
      Throws:
      IllegalArgumentException - if the current user is not logged in.
    • disableFeatureForUser

      void disableFeatureForUser(@NotNull @NotNull String featureKey, @NotNull @NotNull com.atlassian.user.User user)
      Disable a given feature for a given user.
      Parameters:
      featureKey - the feature key to be disabled.
      user - the user for which the feature should be disabled.
      Throws:
      org.acegisecurity.AccessDeniedException - if the current user is not an admin.
    • isFeatureForUserEnabled

      boolean isFeatureForUserEnabled(@NotNull @NotNull String featureKey, @NotNull @NotNull com.atlassian.user.User user)
      Check whether a given feature key is enabled for a given user. Apart from checking whether the feature is enabled for the given user, this will also check site-wide enabled features.
      Parameters:
      featureKey - the feature key
      user - the user
      Returns:
      whether the feature key is enabled for the given user.
    • isFeatureForCurrentUserEnabled

      boolean isFeatureForCurrentUserEnabled(@NotNull @NotNull String featureKey)
      Check whether a given feature key is enabled for the current user. Apart from checking whether the feature is enabled for the current user, this will also check site-wide enabled features.
      Parameters:
      featureKey - the feature key
      Returns:
      whether the feature key is enabled for the current user.