Class UserBasedFilterQASecurity

java.lang.Object
org.dspace.qaevent.security.UserBasedFilterQASecurity
All Implemented Interfaces:
QASecurity

public class UserBasedFilterQASecurity extends Object implements QASecurity
QASecurity implementations that allow access to only qa events that match a SORL query generated using the eperson uuid
Author:
Andrea Bollini (andrea.bollini at 4science.com)
  • Constructor Details

    • UserBasedFilterQASecurity

      public UserBasedFilterQASecurity()
  • Method Details

    • generateFilterQuery

      public Optional<String> generateFilterQuery(Context context, EPerson user)
      Description copied from interface: QASecurity
      Return a SOLR queries that can be applied querying the qaevent SOLR core to retrieve only the qaevents visible to the provided user
      Specified by:
      generateFilterQuery in interface QASecurity
      Parameters:
      context - the DSpace context
      user - the user to consider to restrict the visible qaevents
      Returns:
      the SOLR filter query to apply
    • canSeeQASource

      public boolean canSeeQASource(Context context, EPerson user)
      Description copied from interface: QASecurity
      Return true it the user is potentially allowed to see events in the qasource that adopt this security strategy
      Specified by:
      canSeeQASource in interface QASecurity
      Parameters:
      context - the DSpace context
      user - the user to consider to restrict the visible qaevents
      Returns:
      true if the user can eventually see some qaevents
    • canSeeQAEvent

      public boolean canSeeQAEvent(Context context, EPerson user, QAEvent qaEvent)
      Description copied from interface: QASecurity
      Return true it the user is potentially allowed to see events in the qasource that adopt this security strategy
      Specified by:
      canSeeQAEvent in interface QASecurity
      Parameters:
      context - the DSpace context
      user - the user to consider to restrict the visible qaevents
      Returns:
      true if the user can see the provided qaEvent
    • setFilterTemplate

      public void setFilterTemplate(String filterTemplate)
    • setAllowAdmins

      public void setAllowAdmins(boolean allowAdmins)