Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20110 kshitij.so 1
package in.shop2020.serving.interceptors;
2
 
3
 
4
import org.apache.shiro.SecurityUtils;
5
 
6
import com.opensymphony.xwork2.ActionInvocation;
7
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
8
 
9
public class ReturnTransactionsInterceptor extends AbstractInterceptor{
10
 
11
	/**
12
	 * 
13
	 */
14
	private static final long serialVersionUID = 1L;
15
 
16
 
17
	public String intercept(ActionInvocation invocation) throws Exception {
18
 
19
		if(SecurityUtils.getSubject().hasRole("TeamLead") || SecurityUtils.getSubject().hasRole("Agent")){
20
			return invocation.invoke();
21
		}
22
		return null;
23
	}
24
 
25
}