Package org.infoglue.cms.exception

Examples of org.infoglue.cms.exception.AccessConstraintException


                ContentVO contentVO = ContentControllerProxy.getController().getContentVOWithId(contentId);
                if(!contentVO.getCreatorName().equalsIgnoreCase(principal.getName()))
                {
                  Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(contentId);
                  if(ContentControllerProxy.getController().getIsContentProtected(contentId) && !AccessRightController.getController().getIsPrincipalAuthorized(principal, "Content.ChangeAccessRights", protectedContentId.toString()))
                    ceb.add(new AccessConstraintException("Content.contentId", "1006"));
                }
              }
              else if(interceptionPointCategory.equalsIgnoreCase("SiteNodeVersion"))
              { 
                Integer siteNodeVersionId = new Integer(parameters);
                SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(siteNodeVersionId);
                if(!siteNodeVersionVO.getVersionModifier().equalsIgnoreCase(principal.getName()))
                {
                  Integer protectedSiteNodeVersionId = SiteNodeVersionControllerProxy.getSiteNodeVersionControllerProxy().getProtectedSiteNodeVersionId(siteNodeVersionId);
                  if(protectedSiteNodeVersionId != null && !AccessRightController.getController().getIsPrincipalAuthorized(principal, "SiteNodeVersion.ChangeAccessRights", siteNodeVersionId.toString()))
                    ceb.add(new AccessConstraintException("SiteNodeVersion.siteNodeId", "1006"));
                }
              }
              else
              {
                ceb.add(new AccessConstraintException("Repository.repositoryId", "1006"));
              }
             
              ceb.throwIfNotEmpty();

                 
View Full Code Here


      {
          this.contentVO = ContentControllerProxy.getController().getACContentVOWithId(this.getInfoGluePrincipal(), contentId);
          if(this.contentVO.getRepositoryId() != null && checkPermission && !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();
          }
      }
     
      logger.info("this.contentVO:" + this.contentVO);
View Full Code Here

   
    AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
 
    Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(parentContentId);
    if(protectedContentId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.Create", protectedContentId.toString()))
      ceb.add(new AccessConstraintException("Content.contentId", "1002"));

    //if(ContentControllerProxy.getController().getIsContentProtected(parentContentId) && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.Create", parentContentId.toString()))
    //  ceb.add(new AccessConstraintException("Content.contentId", "1002"));

    ceb.throwIfNotEmpty();
View Full Code Here

  public String doMarkForDelete() throws ConstraintException, Exception
  {
    boolean hasAccessToManagementTool = hasAccessTo("ManagementTool.Read");
    if(!hasAccessToManagementTool)
      throw new AccessConstraintException("Repository.delete", "1003");

    validateSecurityCode();

    this.repositoryVO.setRepositoryId(this.getRepositoryId());
    try
View Full Code Here

 
  public String doMarkForDeleteByForce() throws ConstraintException, Exception
  {
    boolean hasAccessToManagementTool = hasAccessTo("ManagementTool.Read");
    if(!hasAccessToManagementTool)
      throw new AccessConstraintException("Repository.delete", "1003");

    validateSecurityCode();

    this.repositoryVO.setRepositoryId(this.getRepositoryId());
    try
View Full Code Here

  protected String doExecute() throws ConstraintException, Exception
  {
    boolean hasAccessToManagementTool = hasAccessTo("ManagementTool.Read");
    if(!hasAccessToManagementTool)
      throw new AccessConstraintException("Repository.delete", "1003");

    validateSecurityCode();

    this.repositoryVO.setRepositoryId(this.getRepositoryId());
    try
View Full Code Here

  public String doExecuteByForce() throws ConstraintException, Exception
  {
    boolean hasAccessToManagementTool = hasAccessTo("ManagementTool.Read");
    if(!hasAccessToManagementTool)
      throw new AccessConstraintException("Repository.delete", "1003");
     
    validateSecurityCode();

      this.repositoryVO.setRepositoryId(this.getRepositoryId());
    try
View Full Code Here

       
      AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
   
      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();

      contentVersionVOList = ContentVersionController.getContentVersionController().getContentVersionVOWithParentRecursive(contentId, ContentVersionVO.PUBLISHED_STATE, false);
    }
View Full Code Here

         
        AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
     
        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();
 
        processBean.updateProcess("Getting child contents available for unpublish");
       
View Full Code Here

    {
    AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
   
    Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(parentContentId);
    if(protectedContentId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.Create", protectedContentId.toString()))
      ceb.add(new AccessConstraintException("Content.contentId", "1002"));
   
    Map args = new HashMap();
      args.put("globalKey", "infoglue");
      PropertySet ps = PropertySetManager.getInstance("jdbc", args);
View Full Code Here

TOP

Related Classes of org.infoglue.cms.exception.AccessConstraintException

Copyright © 2018 www.massapicom. 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.