Interface QAEventSecurityService

All Known Implementing Classes:
QAEventSecurityServiceImpl

public interface QAEventSecurityService
Interface to limit the visibility of QAEvent to specific users.
Author:
Andrea Bollini (andrea.bollini at 4science.com)
  • Method Details

    • canSeeSource

      boolean canSeeSource(Context context, EPerson user, String sourceName)
      Check if the specified user can see a specific QASource
      Parameters:
      context - the context
      user - the eperson to consider
      sourceName - the source name
      Returns:
      true if the specified user can eventually see events in the QASource
    • canSeeEvent

      boolean canSeeEvent(Context context, EPerson user, QAEvent qaEvent)
      Check if the specified user can see a specific QAEvent. It is expected that a QAEvent in a not visible QASource cannot be accessed. So implementation of this method should enforce this rule.
      Parameters:
      context - the context
      user - the eperson to consider
      qaEvent - the qaevent to check
      Returns:
      true if the specified user can see the specified event
    • generateQAEventFilterQuery

      Optional<String> generateQAEventFilterQuery(Context context, EPerson user, String sourceName)
      Generate a query to restrict the qa events returned by other search/find method to the only ones visible to the specified user
      Parameters:
      context - the context
      user - the eperson to consider
      sourceName - the source name
      Returns:
      the solr filter query