protected void checkPermissions(DocumentConfigurationViewForm form) { String docTypeDocumentType = getMaintenanceDocumentDictionaryService().getDocumentTypeName(DocumentType.class); try { if ((docTypeDocumentType != null) && getDocumentHelperService() .getDocumentAuthorizer(docTypeDocumentType) .canInitiate(docTypeDocumentType, GlobalVariables.getUserSession().getPerson())) { form.setCanInitiateDocumentTypeDocument(true); } } catch (Exception ex) { // just skip - and don't display links LOG.error( "Unable to check DocumentType initiation permission for " + docTypeDocumentType, ex); } String permissionDocumentType = getMaintenanceDocumentDictionaryService().getDocumentTypeName(PermissionBo.class); try { if ((permissionDocumentType != null) && getDocumentHelperService() .getDocumentAuthorizer(permissionDocumentType) .canInitiate(permissionDocumentType, GlobalVariables.getUserSession().getPerson())) { form.setCanInitiatePermissionDocument(true); } } catch (Exception ex) { // just skip - and don't display links LOG.error( "Unable to check Permission initiation permission for " + permissionDocumentType, ex); } String responsibilityDocumentType = getMaintenanceDocumentDictionaryService().getDocumentTypeName(ResponsibilityBo.class); try { if ((responsibilityDocumentType != null) && getDocumentHelperService() .getDocumentAuthorizer(responsibilityDocumentType) .canInitiate( responsibilityDocumentType, GlobalVariables.getUserSession().getPerson())) { form.setCanInitiateResponsibilityDocument(true); } } catch (Exception ex) { // just skip - and don't display links LOG.error( "Unable to check Responsibility initiation permission for " + responsibilityDocumentType, ex); } }