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:
@AdminOnlyannotation provides framework-level enforcement viaAnnotatedSecurityCheckerwhich intercepts requests before they reach resource methods- Explicit runtime checks using
AutomationPermissionService.isJiraAdmin(ApplicationUser)provide secondary verification in each method
GlobalPermissionKey.ADMINISTER.-
Constructor Summary
ConstructorsConstructorDescriptionRuleComponentRestrictionsResource(JiraAuthenticationContext authenticationContext, AutomationPermissionService permissionService, RuleComponentRestrictionService restrictionService) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseReturns all rule component restrictions.jakarta.ws.rs.core.ResponsereplaceAllRestrictions(RuleComponentRestrictionsResponse requestBean) Replaces the entire rule component restrictions configuration.
-
Constructor Details
-
RuleComponentRestrictionsResource
@Inject public RuleComponentRestrictionsResource(JiraAuthenticationContext authenticationContext, AutomationPermissionService permissionService, RuleComponentRestrictionService restrictionService)
-
-
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
-