Interface SubscriptionAccessValidationService

All Known Implementing Classes:
DefaultSubscriptionAccessValidationService

public interface SubscriptionAccessValidationService
Performs validation to check the accessibility of the subscriptions for the user.
Author:
karanjariwala
  • Method Summary

    Modifier and Type
    Method
    Description
    getAccessibleSubscriptions(String[] permissionRoots, Collection<SWI> subscriptionWithItems, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Filters a Collection of the subscriptionWithItems and returns those subscriptions that are accessible to the current user (customer or account).
    <SWI extends SubscriptionWithItems>
    org.springframework.data.domain.Page<SWI>
    getAccessibleSubscriptions(String[] permissionRoots, org.springframework.data.domain.Page<SWI> subscriptionWithItems, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Filters a Page of the subscriptionWithItems and returns those subscriptions that are accessible to the current user (customer or account).
    void
    validateAccess(String[] permissionRoots, String subscriptionId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Validates whether the current user is restricted to certain subscriptions only.
  • Method Details

    • validateAccess

      void validateAccess(String[] permissionRoots, String subscriptionId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Validates whether the current user is restricted to certain subscriptions only. And if restricted, validates that the user is allowed to access the given subscriptionId.
      Parameters:
      permissionRoots - the permissionRoots that the user's access is to be checked for
      subscriptionId - the subscription whose access is to be checked
      contextInfo - the context information around multi-tenant state
    • getAccessibleSubscriptions

      <SWI extends SubscriptionWithItems> Collection<SWI> getAccessibleSubscriptions(String[] permissionRoots, Collection<SWI> subscriptionWithItems, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Filters a Collection of the subscriptionWithItems and returns those subscriptions that are accessible to the current user (customer or account).
      Parameters:
      permissionRoots - the permissionRoots that the user's access is to be checked for
      subscriptionWithItems - the collection of subscriptions to be filtered
      contextInfo - the context information around multi-tenant state
      Returns:
      a Collection of SubscriptionWithItems that the current user can access
    • getAccessibleSubscriptions

      <SWI extends SubscriptionWithItems> org.springframework.data.domain.Page<SWI> getAccessibleSubscriptions(String[] permissionRoots, org.springframework.data.domain.Page<SWI> subscriptionWithItems, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Filters a Page of the subscriptionWithItems and returns those subscriptions that are accessible to the current user (customer or account).
      Parameters:
      permissionRoots - the permissionRoots that the user's access is to be checked for
      subscriptionWithItems - the page of subscriptions to be filtered
      contextInfo - the context information around multi-tenant state
      Returns:
      a Page of SubscriptionWithItems that the current user can access