Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

package in.shop2020.serving.interceptors;


import org.apache.shiro.SecurityUtils;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class ReturnTransactionsInterceptor extends AbstractInterceptor{

        /**
         * 
         */
        private static final long serialVersionUID = 1L;


        public String intercept(ActionInvocation invocation) throws Exception {
                
                if(SecurityUtils.getSubject().hasRole("TeamLead") || SecurityUtils.getSubject().hasRole("Agent")){
                        return invocation.invoke();
                }
                return null;
        }
                
}