Package org.dspace.qaevent.service
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 Summary
Modifier and TypeMethodDescriptionbooleancanSeeEvent(Context context, EPerson user, QAEvent qaEvent) Check if the specified user can see a specific QAEvent.booleancanSeeSource(Context context, EPerson user, String sourceName) Check if the specified user can see a specific QASourcegenerateQAEventFilterQuery(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
-
Method Details
-
canSeeSource
Check if the specified user can see a specific QASource- Parameters:
context- the contextuser- the eperson to considersourceName- the source name- Returns:
trueif the specified user can eventually see events in the QASource
-
canSeeEvent
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 contextuser- the eperson to considerqaEvent- the qaevent to check- Returns:
trueif the specified user can see the specified event
-
generateQAEventFilterQuery
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 contextuser- the eperson to considersourceName- the source name- Returns:
- the solr filter query
-