@Override
public int doStartTag() throws JspException {
WebApplicationContext webApplicationContext = RequestContextUtils
.getWebApplicationContext(pageContext.getRequest());
PermissionService permissionService = webApplicationContext.getBean(PermissionService.class);
Project project = (Project) pageContext.getRequest().getAttribute(PROJECT_KEY);
User user = (User) pageContext.getRequest().getAttribute(USER_KEY);
if(permissionService.hasPermission(project, user, code)) {
return EVAL_BODY_INCLUDE;
}
return SKIP_BODY;
}