Class QueryUserFilterInterceptor
java.lang.Object
org.chenile.core.interceptors.BaseChenileInterceptor
org.chenile.query.service.interceptor.QueryUserFilterInterceptor
- All Implemented Interfaces:
Command<ChenileExchange>
For specific queries, we should restrict the results only to authorized
users. Typically authorized users are the users and their lines of
supervisors. Hence a user can see everyone who lies in their group. Such
queries must use the auth_id as the filter and must support a list of
authId's This interceptor generates the list of authId's from the current
user down to his reportees
- Author:
- Raja Shankar Kolluru
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ContextContainerprivate SearchService<Map<String,Object>> private Stringprivate static String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoPreProcessing(ChenileExchange exchange) Override this to do pre-processing.protected voidenhanceSystemFilters(Map<String, Object> systemFilters) executeUserReporteesQuery(String userId) Methods inherited from class org.chenile.core.interceptors.BaseChenileInterceptor
bypassInterception, doContinue, doPostProcessing, execute, getExtensionByAnnotation, getExtensionByAnnotation, resumeFromSavedPoint, savePoint
-
Field Details
-
contextContainer
-
searchService
-
USER_REPORTEES_QUERY_NAME
-
skipAuthIds
-
-
Constructor Details
-
QueryUserFilterInterceptor
public QueryUserFilterInterceptor()
-
-
Method Details
-
doPreProcessing
Description copied from class:BaseChenileInterceptorOverride this to do pre-processing. This will be called before the service is invoked. Don't expect to see exception or response being set inChenileExchange. However you can check forChenileExchange.getBody()to manipulate the body if this interceptor is a Chenile post processor or a service specific or operation specific interceptor.
If this interceptor is a Chenile pre-processor, thenChenileExchange.getBody()will return null. Then you need to look at headers only.- Overrides:
doPreProcessingin classBaseChenileInterceptor
-
enhanceSystemFilters
-
executeUserReporteesQuery
-