use of org.kuali.kfs.pdp.service.PdpAuthorizationService in project cu-kfs by CU-CommunityApps.
the class FormatAction method execute.
/**
* @see org.kuali.kfs.kns.web.struts.action.KualiAction#execute(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
PdpAuthorizationService authorizationService = SpringContext.getBean(PdpAuthorizationService.class);
Person kualiUser = GlobalVariables.getUserSession().getPerson();
String methodToCall = findMethodToCall(form, request);
if (!authorizationService.hasFormatPermission(kualiUser.getPrincipalId())) {
throw new AuthorizationException(kualiUser.getPrincipalName(), methodToCall, kualiUser.getCampusCode());
}
return super.execute(mapping, form, request, response);
}
Aggregations