Interface AccessDisablingHelper

All Known Implementing Classes:
AccessDisablingHelperImpl

public interface AccessDisablingHelper
Helper class that makes easier blocking unauthorized access to Jira endpoints.

This class helps to reduce amount of work required to secure Jira endpoints against unauthorized access and backport changes to LTS versions of Jira. Helper check if user is anonymous and/or has specified global permission and restriction is enabled/disabled with feature flag.

Helper automatically switch the feature flag behaviour from opt-in to opt-out for version specified by config. It makes easy to backport risky changes to LTS versions as opt-in and as opt-out for newer versions.

Helper has build-in solution for tracking deprecation of feature flag. Developer can set versions since which helper will start printing log about outdated feature flag.

Note: Feel free to extend this class for other cases like checking against project permissions, etc

  • Method Details

    • canBeAccessedByCurrentUser

      boolean canBeAccessedByCurrentUser(AccessDisablingHelperConfig config)
      Verifies if current user can visit endpoint
      Parameters:
      config - set of rules to check against. AccessDisablingHelperConfig
      Returns:
      true if user is allowed to visit endpoint, false otherwise