Package com.dotmarketing.exception

Examples of com.dotmarketing.exception.DotSecurityException


      List<Permission> newSetOfPermissions = new ArrayList<Permission>();
      HostAPI hostAPI = APILocator.getHostAPI();
    User systemUser = APILocator.getUserAPI().getSystemUser();

    if(!doesUserHavePermission(permissionable, PermissionAPI.PERMISSION_EDIT_PERMISSIONS, user))
      throw new DotSecurityException("User id: " + user.getUserId() + " does not have permission to alter permissions on asset " + permissionable.getPermissionId());

      if(parent.isParentPermissionable()){

        String type = permissionable.getPermissionType();
        perList.addAll(permissionFactory.getInheritablePermissions(parent));
View Full Code Here


      // SYSTEM_FOLDER means if the user has permissions to the host, then they can see host.com/
      if(FolderAPI.SYSTEM_FOLDER.equals(f.getInode())) {
        if(!Host.SYSTEM_HOST.equals(host.getIdentifier())){
          if(!papi.doesUserHavePermission(host, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
            throw new DotSecurityException("User " + user + " does not have permission to read " + f.getInode());
          }
        }
      }

    }
View Full Code Here

      DotSecurityException {

    boolean renamed = false;

    if (!papi.doesUserHavePermission(folder, PermissionAPI.PERMISSION_EDIT, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to edit " + folder.getName());
    }

    boolean localTransaction = false;
    try {
      localTransaction = HibernateUtil.startLocalTransactionIfNeeded();
View Full Code Here

    Host host = APILocator.getHostAPI().find(id.getHostId(), user, respectFrontEndPermissions);
    Folder f = ffac.findFolderByPath(id.getParentPath(), host);

    if(f == null) return null;
    if (!papi.doesUserHavePermission(f, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + f.getName());
    }
    return f;

  }
View Full Code Here

   */

  public List<Folder> findSubFolders(Folder folder, User user, boolean respectFrontEndPermissions) throws DotDataException,
      DotSecurityException {
    if (!papi.doesUserHavePermission(folder, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + folder.getName());
    }

    return ffac.getFoldersByParent(folder, user, respectFrontEndPermissions);
  }
View Full Code Here

  public List<Folder> findSubFolders(Host host, User user, boolean respectFrontEndPermissions) throws DotDataException,
      DotSecurityException {

    if (!papi.doesUserHavePermission(host, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + host.getInode());
    }

    List<Folder> full = ffac.findFoldersByHost(host);
    List<Folder> ret = new ArrayList<Folder>(full.size());
    for(Folder ff : full)
View Full Code Here

  public List<Folder> findThemes(Host host, User user, boolean respectFrontEndPermissions) throws DotDataException,
  DotSecurityException {

    if (!papi.doesUserHavePermission(host, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + host.getInode());
    }

    List<Folder> full = ffac.findThemesByHost(host);
    List<Folder> ret = new ArrayList<Folder>(full.size());
    for(Folder ff : full)
View Full Code Here

  public List<Folder> findSubFoldersRecursively(Folder folder, User user, boolean respectFrontEndPermissions) throws DotDataException,
      DotSecurityException {

    if (!papi.doesUserHavePermission(folder, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + folder.getName());
    }

    List<Folder> subFolders = findSubFolders(folder, user, respectFrontEndPermissions);
    List<Folder> toIterateOver = new ArrayList<Folder>(subFolders);
    for (Folder f : toIterateOver) {
View Full Code Here

   */

  public List<Folder> findSubFoldersRecursively(Host host, User user, boolean respectFrontEndPermissions) throws DotDataException,
      DotSecurityException {
    if (!papi.doesUserHavePermission(host, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + host.getHostname());
    }
    List<Folder> subFolders = ffac.findFoldersByHost(host);
    List<Folder> toIterateOver = new ArrayList<Folder>(subFolders);
    for (Folder f : toIterateOver) {
      if (papi.doesUserHavePermission(f, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
View Full Code Here

  public void copy(Folder folderToCopy, Folder newParentFolder, User user, boolean respectFrontEndPermissions) throws DotDataException,
      DotSecurityException, DotStateException, IOException {

    if (!papi.doesUserHavePermission(folderToCopy, PermissionAPI.PERMISSION_READ, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to read " + folderToCopy.getName());
    }

    if (!papi.doesUserHavePermission(newParentFolder, PermissionAPI.PERMISSION_CAN_ADD_CHILDREN, user, respectFrontEndPermissions)) {
      throw new DotSecurityException("User " + user + " does not have permission to add to " + newParentFolder.getName());
    }

    ffac.copy(folderToCopy, newParentFolder);
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.exception.DotSecurityException

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.