Examples of PermissionException


Examples of com.im.imjutil.exception.PermissionException

      }
    }
   
    // Testa se a regra nao esta em sessao
    if (rule == null) {
      throw new PermissionException(MSG_TEXT);
    }
   
    // Testa se a regra possui acesso a url requisitada
    if (!rule.containsRule(urlAccess)) {
      throw new PermissionException(MSG_TEXT);
    }
   
  }
View Full Code Here

Examples of com.serotonin.m2m2.vo.permission.PermissionException

        data.getState().setAttribute("viewComponentStates", states);
    }

    public static void ensureViewPermission(User user, GraphicalView view) throws PermissionException {
        if (view.getUserAccess(user) == ShareUser.ACCESS_NONE)
            throw new PermissionException("User does not have permission to the view", user);
    }
View Full Code Here

Examples of com.serotonin.m2m2.vo.permission.PermissionException

            throw new PermissionException("User does not have permission to the view", user);
    }

    public static void ensureViewEditPermission(User user, GraphicalView view) throws PermissionException {
        if (view.getUserAccess(user) != ShareUser.ACCESS_OWNER)
            throw new PermissionException("User does not have permission to edit the view", user);
    }
View Full Code Here

Examples of com.serotonin.m2m2.vo.permission.PermissionException

        return watchListStates;
    }

    public static void ensureWatchListPermission(User user, WatchList watchList) throws PermissionException {
        if (watchList.getUserAccess(user) == ShareUser.ACCESS_NONE)
            throw new PermissionException("User does not have permission to the watch list", user);
    }
View Full Code Here

Examples of com.serotonin.m2m2.vo.permission.PermissionException

            throw new PermissionException("User does not have permission to the watch list", user);
    }

    public static void ensureWatchListEditPermission(User user, WatchList watchList) throws PermissionException {
        if (watchList.getUserAccess(user) != ShareUser.ACCESS_OWNER)
            throw new PermissionException("User does not have permission to edit the watch list", user);
    }
View Full Code Here

Examples of com.serotonin.m2m2.vo.permission.PermissionException

    @DwrPermission(anonymous = true)
    public String setViewPointAnon(int viewId, String viewComponentId, String valueStr) {
        GraphicalView view = GraphicalViewsCommon.getAnonymousViewDwr(viewId);
        if (view == null)
            throw new PermissionException("View is not in session", null);

        if (view.getAnonymousAccess() != ShareUser.ACCESS_SET)
            throw new PermissionException("Point is not anonymously settable", null);

        // Allow the set.
        setPointImpl(view.findDataPoint(viewComponentId), valueStr, new AnonymousUser());

        return viewComponentId;
View Full Code Here

Examples of com.serotonin.m2m2.vo.permission.PermissionException

        if (point != null) {
            // Check that setting is allowed.
            int access = view.getUserAccess(user);
            if (!(access == ShareUser.ACCESS_OWNER || access == ShareUser.ACCESS_SET))
                throw new PermissionException("Not allowed to set this point", user);

            // Try setting the point.
            setPointImpl(point, valueStr, user);
        }
View Full Code Here

Examples of com.serotonin.m2m2.vo.permission.PermissionException

        if (user == null)
            throw new RuntimeException("User does not exist");
        if (report == null)
            throw new RuntimeException("Report does not exist");
        if (report.getUserId() != user.getId() && ! user.isAdmin())
            throw new PermissionException("User does not have permission to access the report", user);
    }
View Full Code Here

Examples of com.serotonin.m2m2.vo.permission.PermissionException

        if (user == null)
            throw new RuntimeException("User does not exist");
        if (instance == null)
            throw new RuntimeException("Report instance does not exist");
        if (instance.getUserId() != user.getId() && ! user.isAdmin())
            throw new PermissionException("User does not have permission to access the report instance", user);
    }
View Full Code Here

Examples of de.iritgo.aktera.permissions.PermissionException

    {
      int userId = request.getParameterAsInt("userId", - 1);

      if (! UserTools.currentUserIsInGroup(request, "manager") && UserTools.getCurrentUserId(request) != userId)
      {
        throw new PermissionException("Permission denied to edit com device function keys of user " + userId);
      }

      return userId;
    }
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.