Package org.projectforge.task

Examples of org.projectforge.task.TaskNode


    Validate.notNull(user);
    if (userGroupCache.isUserMemberOfAdminGroup(user.getId()) == true) {
      // A user group "Admin" has always access.
      return true;
    }
    final TaskNode node = taskTree.getTaskNodeById(taskId);
    if (node == null) {
      log.error("Task with " + taskId + " not found.");
      if (throwException == true) {
        throw new AccessException(taskId, accessType, operationType);
      }
      return false;
    }
    final Collection<Integer> groupIds = userGroupCache.getUserGroups(user);
    if (groupIds == null) {
      // No groups are assigned to this user.
      if (throwException == true) {
        throw new AccessException(taskId, accessType, operationType);
      }
      return false;
    }
    for (final Integer groupId : groupIds) {
      if (node.hasPermission(groupId, accessType, operationType) == true) {
        return true;
      }
    }
    if (throwException == true) {
      throw new AccessException(taskId, accessType, operationType);
View Full Code Here

TOP

Related Classes of org.projectforge.task.TaskNode

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.