Package org.dspace.qaevent.service.impl
Class QAEventSecurityServiceImpl
java.lang.Object
org.dspace.qaevent.service.impl.QAEventSecurityServiceImpl
- All Implemented Interfaces:
QAEventSecurityService
Implementation of the security service for QAEvents.
This implementation manages a configuration of
QASecurity instances,
each responsible for security checks for a specific QA source.- Author:
- Mykhaylo Boychuk (mykhaylo.boychuk@4science.com)
-
Constructor Summary
Constructors -
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 qaSource) Check if the specified user can see a specific QASourcegenerateQAEventFilterQuery(Context context, EPerson user, String qaSource) Generate a query to restrict the qa events returned by other search/find method to the only ones visible to the specified uservoidsetDefaultSecurity(QASecurity defaultSecurity) voidsetQaSecurityConfiguration(Map<String, QASecurity> qaSecurityConfiguration)
-
Constructor Details
-
QAEventSecurityServiceImpl
public QAEventSecurityServiceImpl()
-
-
Method Details
-
setQaSecurityConfiguration
-
setDefaultSecurity
-
generateQAEventFilterQuery
Description copied from interface:QAEventSecurityServiceGenerate a query to restrict the qa events returned by other search/find method to the only ones visible to the specified user- Specified by:
generateQAEventFilterQueryin interfaceQAEventSecurityService- Parameters:
context- the contextuser- the eperson to considerqaSource- the source name- Returns:
- the solr filter query
-
canSeeEvent
Description copied from interface:QAEventSecurityServiceCheck 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.- Specified by:
canSeeEventin interfaceQAEventSecurityService- Parameters:
context- the contextuser- the eperson to considerqaEvent- the qaevent to check- Returns:
trueif the specified user can see the specified event
-
canSeeSource
Description copied from interface:QAEventSecurityServiceCheck if the specified user can see a specific QASource- Specified by:
canSeeSourcein interfaceQAEventSecurityService- Parameters:
context- the contextuser- the eperson to considerqaSource- the source name- Returns:
trueif the specified user can eventually see events in the QASource
-