} catch (PermissionException e) { log.warn("cannot remove resourceId=" + resourceId + ":" + e.getMessage()); log.warn("PermissionException from ContentHostingService:" + e.getMessage()); } catch (IdUnusedException e) { log.warn("cannot remove resourceId=" + resourceId + ":"
/** * {@inheritDoc} */ public void saveMeetings(List<SignupMeeting> signupMeetings, String userId) throws PermissionException { if (signupMeetings ==null || signupMeetings.isEmpty()) return; if (isAllowedToCreate(userId, signupMeetings.get(0))) { signupMeetingDao.saveMeetings(signupMeetings); } else{ throw new PermissionException(userId, "signup.create", "signup tool"); } }
throw new EntityPermissionException(e.getUser(), e.getLocalizedMessage(), e.getResource());
private ContentResource getFirstAcceptableAttachement(List attachments) { for( int i =0; i < attachments.size();i++ ) { Reference attachment = (Reference)attachments.get(i); try { ContentResource res = m_contentHostingService.getResource(attachment.getId()); if (contentReviewService.isAcceptableContent(res)) { return res; } } catch (PermissionException e) { // TODO Auto-generated catch block e.printStackTrace(); M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } catch (IdUnusedException e) { // TODO Auto-generated catch block e.printStackTrace(); M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } catch (TypeException e) { // TODO Auto-generated catch block e.printStackTrace(); M_log.warn(":geFirstAcceptableAttachment " + e.getMessage()); } } return null; }
throw new org.sakaiproject.exception.PermissionException( user, RWikiSecurityService.SECURE_READ, ref.getReference()); throw new org.sakaiproject.exception.PermissionException( user, RWikiSecurityService.SECURE_READ, ref.getReference()); throw new EntityPermissionException(p.getUser(),p.getLock(),p.getResource());
throw new EntityPermissionException(e.getUser(), e.getLock(), e.getResource());
/** * {@inheritDoc} */ @Override public boolean saveSite(final Site site) { try { this.siteService.save(site); } catch (final IdUnusedException e) { e.printStackTrace(); return false; } catch (final PermissionException e) { e.printStackTrace(); return false; } return true; }
/** * {@inheritDoc} */ @Override public String getMessage() { return "user=" + m_user + " lock=" + m_lock + " resource=" + getResource(); }
throw new EntityPermissionException(e.getUser(), ContentHostingService.EVENT_RESOURCE_READ, ref.getReference()); } catch (TypeException e) {
throw new EntityPermissionException(e.getUser(), e.getLock(), e.getResource());
e.printStackTrace(); M_log.warn(":getAllAcceptableAttachments " + e.getMessage());
/** * {@inheritDoc} */ @Override public Site addSite(final String id, final String type) { Site site = null; try { site = this.siteService.addSite(id, type); } catch (final IdInvalidException e) { e.printStackTrace(); } catch (final IdUsedException e) { e.printStackTrace(); } catch (final PermissionException e) { e.printStackTrace(); } return site; }
/** * {@inheritDoc} */ @Override public String getMessage() { return "user=" + m_user + " lock=" + m_lock + " resource=" + getResource(); }
} catch (PermissionException e) { log.warn("cannot remove resourceId=" + resourceId + ":" + e.getMessage()); log.warn("PermissionException from ContentHostingService:" + e.getMessage()); } catch (IdUnusedException e) { log.warn("cannot remove resourceId=" + resourceId + ":"
/** * {@inheritDoc} */ public Long saveMeeting(SignupMeeting signupMeeting, String userId) throws PermissionException { if (isAllowedToCreate(userId, signupMeeting)) { return signupMeetingDao.saveMeeting(signupMeeting); } throw new PermissionException(userId, "signup.create", "signup tool"); }
throw new EntityPermissionException(e.getUser(), e.getLocalizedMessage(), e.getResource());
throw new EntityPermissionException(e.getUser(), e.getLock(), e.getResource());
} catch (PermissionException pe) { pe.printStackTrace(); } catch (Exception e) {
public TaggableActivity getActivity(String activityRef, TaggingProvider provider) { // We aren't picky about the provider, so ignore that argument. TaggableActivity activity = null; if (checkReference(activityRef)) { try { Assignment assignment = assignmentService.getAssignment(activityRef); if (assignment != null) activity = new AssignmentActivityImpl(assignment, this); } catch (IdUnusedException iue) { logger.error(iue.getMessage(), iue); } catch (PermissionException pe) { logger.error(pe.getMessage(), pe); } } return activity; }
/** * Check security permission. * * @param lock * The lock id string. * @param resource * The resource reference string, or null if no resource is involved. * @exception PermissionException * Thrown if the user does not have access */ protected void unlock(String lock, String resource) throws PermissionException { if (!unlockCheck(lock, resource)) { throw new PermissionException(sessionManager.getCurrentSessionUserId(), lock, resource); } }