Class RuleComponentRestrictionsResource

java.lang.Object
com.codebarrel.jira.plugin.automation.rest.RuleComponentRestrictionsResource

@Path("restrictions/components") @Consumes("application/json") @Produces("application/json") public class RuleComponentRestrictionsResource extends Object
REST resource for managing automation rule component restrictions.

GET: Returns all rule component restrictions. Accessible to Jira global admins. PUT: Replaces all rule component restrictions. Accessible to Jira global admins.

Security: This resource uses defense-in-depth authorization:

  • @AdminOnly annotation provides framework-level enforcement via AnnotatedSecurityChecker which intercepts requests before they reach resource methods
  • Explicit runtime checks using AutomationPermissionService.isJiraAdmin(ApplicationUser) provide secondary verification in each method
Both mechanisms check GlobalPermissionKey.ADMINISTER.
  • Constructor Details

  • Method Details

    • getAllRestrictions

      @GET public jakarta.ws.rs.core.Response getAllRestrictions()
      Returns all rule component restrictions.

      Auth: Jira global admins only.

      Returns:
      Response containing all restrictions
    • replaceAllRestrictions

      @PUT public jakarta.ws.rs.core.Response replaceAllRestrictions(RuleComponentRestrictionsResponse requestBean)
      Replaces the entire rule component restrictions configuration.

      Auth: Jira global admins only.

      Parameters:
      requestBean - the restrictions configuration to set
      Returns:
      Response containing updated restrictions or appropriate error