Package org.dspace.qaevent.security
Class UserBasedFilterQASecurity
java.lang.Object
org.dspace.qaevent.security.UserBasedFilterQASecurity
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanSeeQAEvent(Context context, EPerson user, QAEvent qaEvent) Returntrueit the user is potentially allowed to see events in the qasource that adopt this security strategybooleancanSeeQASource(Context context, EPerson user) Returntrueit the user is potentially allowed to see events in the qasource that adopt this security strategygenerateFilterQuery(Context context, EPerson user) Return a SOLR queries that can be applied querying the qaevent SOLR core to retrieve only the qaevents visible to the provided uservoidsetAllowAdmins(boolean allowAdmins) voidsetFilterTemplate(String filterTemplate)
-
Constructor Details
-
UserBasedFilterQASecurity
public UserBasedFilterQASecurity()
-
-
Method Details
-
generateFilterQuery
Description copied from interface:QASecurityReturn a SOLR queries that can be applied querying the qaevent SOLR core to retrieve only the qaevents visible to the provided user- Specified by:
generateFilterQueryin interfaceQASecurity- Parameters:
context- the DSpace contextuser- the user to consider to restrict the visible qaevents- Returns:
- the SOLR filter query to apply
-
canSeeQASource
Description copied from interface:QASecurityReturntrueit the user is potentially allowed to see events in the qasource that adopt this security strategy- Specified by:
canSeeQASourcein interfaceQASecurity- Parameters:
context- the DSpace contextuser- the user to consider to restrict the visible qaevents- Returns:
trueif the user can eventually see some qaevents
-
canSeeQAEvent
Description copied from interface:QASecurityReturntrueit the user is potentially allowed to see events in the qasource that adopt this security strategy- Specified by:
canSeeQAEventin interfaceQASecurity- Parameters:
context- the DSpace contextuser- the user to consider to restrict the visible qaevents- Returns:
trueif the user can see the provided qaEvent
-
setFilterTemplate
-
setAllowAdmins
public void setAllowAdmins(boolean allowAdmins)
-