Package org.infoglue.cms.util

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()


          if(protectedSiteNodeVersionId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "SiteNodeVersion.ChangeAccessRights", siteNodeVersionId.toString()))
            ceb.add(new AccessConstraintException("SiteNodeVersion.siteNodeId", "1006"));
        }
      }
     
      ceb.throwIfNotEmpty();
    }
   
    String userName = this.getRequest().getParameter("userName");
    if(this.extraMultiParameter != null && this.extraMultiParameter.length > 0)
    {
View Full Code Here


    {
      if(protectedContentId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.CreateVersion", protectedContentId.toString()))
        ceb.add(new AccessConstraintException("Content.contentId", "1007"));     
    }
   
    ceb.throwIfNotEmpty();

      //If the comment is not null we carry out the stateChange
      if(getStateId().intValue() == 2 && getVersionComment() == null)
      {
        return "commentVersion";
View Full Code Here

     
        Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(contentId);
        if(protectedContentId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.SubmitToPublish", protectedContentId.toString()))
          ceb.add(new AccessConstraintException("Content.contentId", "1005"));
       
        ceb.throwIfNotEmpty();
 
        RequestAnalyser.getRequestAnalyser().registerComponentStatistics("ViewListContentVersion part 1", t.getElapsedTime());
       
        //Set<SiteNodeVersionVO> siteNodeVersionVOList = new HashSet<SiteNodeVersionVO>();
        //Set<ContentVersionVO> contentVersionVOList = new HashSet<ContentVersionVO>();
View Full Code Here

               
        if(this.contentVO.getRepositoryId() != null && !hasAccessTo("Repository.Read", "" + this.contentVO.getRepositoryId()) && !hasAccessTo("Repository.Write", "" + this.contentVO.getRepositoryId()))
        {
        AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
        ceb.add(new AccessConstraintException("Content.contentId", "1000"));
        ceb.throwIfNotEmpty();
        }

        if(this.getIsBranch().booleanValue())
    {
           this.defaultFolderContentTypeName = InfoGlueSettingsController.getInfoGlueSettingsController().getProperty("repository_" + this.getRepositoryId() + "_defaultFolderContentTypeName", "applicationProperties", null, false, false, false, false, null);
View Full Code Here

          if(contentVO.getRepositoryId() != null && !hasAccessTo("Repository.Read", "" + contentVO.getRepositoryId()) && !hasAccessTo("Repository.Write", "" + this.contentVO.getRepositoryId()))
          {
            logger.error("The user " + this.getInfoGluePrincipal().getName() + " had no access to Repository.Read or Repository.write and " + this.contentVO.getRepositoryId() + ". Could be an hacker attempt.");
          AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
          ceb.add(new AccessConstraintException("Content.contentId", "1000"));
          ceb.throwIfNotEmpty();
          }

          if((this.stay == null || !this.stay.equalsIgnoreCase("true")) && contentVO.getIsBranch().booleanValue() == false && contentVO.getContentTypeDefinitionId() != null && getShowContentVersionFirst().equalsIgnoreCase("true"))
          {
              if(this.repositoryId == null)
View Full Code Here

          if(contentVO.getRepositoryId() != null && !hasAccessTo("Repository.Read", "" + contentVO.getRepositoryId())  && !hasAccessTo("Repository.Write", "" + this.contentVO.getRepositoryId()))
          {
            logger.error("The user " + this.getInfoGluePrincipal().getName() + " had no access to Repository.Read or Repository.write and " + this.contentVO.getRepositoryId() + ". Could be an hacker attempt.");
          AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
          ceb.add(new AccessConstraintException("Content.contentId", "1000"));
          ceb.throwIfNotEmpty();
          }

          if((this.stay == null || !this.stay.equalsIgnoreCase("true")) && contentVO.getIsBranch().booleanValue() == false && contentVO.getContentTypeDefinitionId() != null && getShowContentVersionFirst().equalsIgnoreCase("true"))
          {
              if(this.repositoryId == null)
View Full Code Here

      Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(this.contentVersionVO.getContentId());
      logger.info("protectedContentId:" + protectedContentId);
      if(protectedContentId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.Write", protectedContentId.toString()))
        ceb.add(new AccessConstraintException("Content.contentId", "1001"));
     
      ceb.throwIfNotEmpty();
     
      String attributeValue = "";
      if(this.contentVersionVO != null)
      {
        attributeValue = ContentVersionController.getContentVersionController().getAttributeValue(contentVersionVO, attributeName, false);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.