Class AdministratorsOnlyQASecurity

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

public class AdministratorsOnlyQASecurity extends Object implements QASecurity
QASecurity that restrict access to the QA Source and related events only to repository administrators
Author:
Andrea Bollini (andrea.bollini at 4science.com)
  • Constructor Details

    • AdministratorsOnlyQASecurity

      public AdministratorsOnlyQASecurity()
  • Method Details

    • generateFilterQuery

      public Optional<String> generateFilterQuery(Context context, EPerson currentUser)
      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
      currentUser - 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