/** * Remove security advisor */ private void disableSecurityAdvisor() { securityService.popAdvisor(); }
/** * Remove security advisor */ private void disableSecurityAdvisor() { securityService.popAdvisor(); }
/** * remove recent add SecurityAdvisor from stack */ protected void disableSecurityAdvisor() { securityService.popAdvisor(); }
/** * Remove security advisor from the stack */ private void disableSecurityAdvisor(SecurityAdvisor securityAdvisor){ securityService.popAdvisor(securityAdvisor); }
/** * Remove security advisor from the stack */ private void disableSecurityAdvisor() { this.securityService.popAdvisor(); }
/** * Remove security advisor from the stack */ private void disableSecurityAdvisor(SecurityAdvisor advisor){ securityService.popAdvisor(advisor); }
public void popAdvisor(SecurityAdvisor advisor) { securityService.popAdvisor(advisor); }
private void popAdvisor(SecurityAdvisor advisor) { securityService.popAdvisor(advisor); }
protected void popAdvisor(SecurityAdvisor sa) { if (sa != null) { securityService.popAdvisor(sa); } else { throw new IllegalArgumentException("popAdvisor was called with a null SecurityAdvisor"); } }
protected void popAdvisor(SecurityAdvisor sa) { if (sa != null) { securityService.popAdvisor(sa); } else { throw new IllegalArgumentException("popAdvisor was called with a null SecurityAdvisor"); } }
public static org.sakaiproject.authz.api.SecurityAdvisor popAdvisor() { org.sakaiproject.authz.api.SecurityService service = getInstance(); if (service == null) return null; return service.popAdvisor(); }
public static org.sakaiproject.authz.api.SecurityAdvisor popAdvisor() { org.sakaiproject.authz.api.SecurityService service = getInstance(); if (service == null) return null; return service.popAdvisor(); }
/** * Disabled the security advisor. */ protected void disableAzgSecurityAdvisor() { SecurityAdvisor popped = m_securityService.popAdvisor(ALLOW_ADVISOR); if (!ALLOW_ADVISOR.equals(popped)) { if (popped == null) { log.warn("Someone has removed our advisor."); } else { log.warn("Removed someone elses advisor, adding it back."); m_securityService.pushAdvisor(popped); } } }
/** * Disable the security advisor. */ protected void disableAzgSecurityAdvisor() { SecurityAdvisor popped = securityService.popAdvisor(allowAllAdvisor); if (!allowAllAdvisor.equals(popped)) { if (popped == null) { getLog().debug("Someone has removed our advisor."); } else { getLog().debug("Removed someone elses advisor, adding it back."); securityService.pushAdvisor(popped); } } }
/** * Disabled the security advisor. */ protected void disableAzgSecurityAdvisor() { SecurityAdvisor popped = securityService().popAdvisor(); if (!ALLOW_ADVISOR.equals(popped)) { if (popped == null) { log.warn("Someone has removed our advisor."); } else { log.warn("Removed someone elses advisor, adding it back."); securityService().pushAdvisor(popped); } } }
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { getSecurityService().pushAdvisor(new AllowAllSecurityAdvisor()); for (Iterator i=getTasks().iterator();i.hasNext();) { WarehouseTask task = (WarehouseTask)i.next(); try { task.execute(); } catch (Exception e) { logger.error("problem running dw warehouse task:" + e.getMessage(), e); } } getSecurityService().popAdvisor(); }
public boolean isObsolete() { securityService.pushAdvisor(new SecurityAdvisor() { public SecurityAdvice isAllowed(String userId, String function, String reference) { return SecurityAdvice.ALLOWED; } }); try { chs.getProperties(this.resourceId); return false; } catch (PermissionException e1) { return true; } catch (IdUnusedException e1) { return true; } finally { securityService.popAdvisor(); } }
/** * Returns podcast folder id using either 'podcasts' or 'Podcasts'. If it * cannot find or is denied access, it will return null. * * @param siteId * The site to search * * @return String * Contains the complete id for the podcast folder */ public String retrievePodcastFolderId(String siteId) { String podcastFolderId = null; try { enablePodfeedSecurityAdvisor(); podcastFolderId = podcastService.retrievePodcastFolderId(siteId); } catch (PermissionException e) { // log and return null to indicate there was a problem generating LOG.error("PermissionException while trying to retrieve Podcast folder Id string " + "while generating feed for site " + siteId + e.getMessage(), e); } finally { securityService.popAdvisor(); } return podcastFolderId; }
public boolean checkFormConsumption(Id formId) { String type = formId.getValue(); getSecurityService().pushAdvisor(new SecurityAdvisor() { public SecurityAdvice isAllowed(String userId, String function, String reference) { return SecurityAdvice.ALLOWED; } }); try { Collection arts = getStructuredArtifactFinder().findByType(type); return arts != null && arts.size() > 0; } finally { getSecurityService().popAdvisor(); } }
/** * Returns TRUE if Podcasts folder has HIDDEN property set * OR release date is in the future * OR retract date is in the past * * 05/08 - enable security advisor since if folder is truly * hidden and a student/access user attempts to access it will * generate a Permissions error */ public boolean isPodcastFolderHidden(String siteId) throws IdUnusedException, PermissionException { enablePodcastSecurityAdvisor(); ContentCollection podcastFolder = getContentCollection(siteId); Date tempDate = null; if (podcastFolder.getReleaseDate() != null) { tempDate = new Date(podcastFolder.getReleaseDate().getTime()); } boolean result = podcastPermissionsService.isResourceHidden(podcastFolder, tempDate); securityService.popAdvisor(); return result; }