Package org.projectforge.access

Examples of org.projectforge.access.AccessException


  {
    if (accessChecker.userEquals(user, obj.getUser()) == true) {
      return true;
    }
    if (throwException == true) {
      throw new AccessException("userPref.error.userIsNotOwner");
    } else {
      return false;
    }
  }
View Full Code Here


        && CollectionUtils.isNotEmpty(obj.getPositionen()) == true) {
      // Special field check for non finance administrative staff members:
      if (operationType == OperationType.INSERT) {
        for (final AuftragsPositionDO position : obj.getPositionen()) {
          if (position.isVollstaendigFakturiert() == true) {
            throw new AccessException("fibu.auftrag.error.vollstaendigFakturiertProtection");
          }
        }
      } else if (oldObj != null) {
        for (short number = 1; number <= obj.getPositionen().size(); number++) {
          final AuftragsPositionDO position = obj.getPosition(number);
          final AuftragsPositionDO dbPosition = oldObj.getPosition(number);
          if (dbPosition == null) {
            if (position.isVollstaendigFakturiert() == true) {
              throw new AccessException("fibu.auftrag.error.vollstaendigFakturiertProtection");
            }
          } else if (position.isVollstaendigFakturiert() != dbPosition.isVollstaendigFakturiert()) {
            throw new AccessException("fibu.auftrag.error.vollstaendigFakturiertProtection");
          }
        }
      }
    }
    if (accessChecker.isUserMemberOfGroup(user, UserRights.FIBU_ORGA_GROUPS) == true
View Full Code Here

    Validate.notNull(obj);
    Validate.notNull(obj.getOwnerId());
    Validate.notNull(obj.getContactId());
    final PFUserDO owner = PFUserContext.getUser();
    if (owner == null || owner.getId().equals(obj.getOwnerId()) == false) {
      throw new AccessException("address.accessException.userIsNotOwnerOfPersonalAddress");
    }
    accessChecker.checkRestrictedOrDemoUser();
  }
View Full Code Here

   */
  private List<VEvent> getEvents(final Map<String, String> params, PFUserDO timesheetUser)
  {
    final PFUserDO loggedInUser = PFUserContext.getUser();
    if (loggedInUser == null) {
      throw new AccessException("No logged-in-user found!");
    }
    final List<VEvent> events = new ArrayList<VEvent>();
    final TimeZone timezone = ICal4JUtils.getUserTimeZone();
    final java.util.Calendar cal = java.util.Calendar.getInstance(PFUserContext.getTimeZone());

View Full Code Here

    Validate.notNull(obj);
    Validate.notNull(obj.getOwnerId());
    Validate.notNull(obj.getAddressId());
    final PFUserDO owner = PFUserContext.getUser();
    if (owner == null || owner.getId().equals(obj.getOwnerId()) == false) {
      throw new AccessException("address.accessException.userIsNotOwnerOfPersonalAddress");
    }
    accessChecker.checkRestrictedOrDemoUser();
  }
View Full Code Here

  }

  private void checkAdminUser()
  {
    if (Login.getInstance().isAdminUser(PFUserContext.getUser()) == false) {
      throw new AccessException(AccessChecker.I18N_KEY_VIOLATION_USER_NOT_MEMBER_OF, ProjectForgeGroup.ADMIN_GROUP.getKey());
    }
  }
View Full Code Here

TOP

Related Classes of org.projectforge.access.AccessException

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.