/** * If the user is owner of the GanttChartDO he has access, otherwise he needs at least select access to the root task. * For project managers the user must be additional of the group of the project manager group (assigned to this task) * or if no project manager group is available for this task the user should be a member of * {@link ProjectForgeGroup#PROJECT_MANAGER}. * * @see org.projectforge.business.user.UserRightAccessCheck#hasSelectAccess(java.lang.Object) */ @Override public boolean hasSelectAccess(final PFUserDO user, final GanttChartDO obj) { if (obj == null) { return false; } return hasAccess(user, obj, obj.getReadAccess()); }
/** * If the user is owner of the GanttChartDO he has access, otherwise he needs at least select access to the root task. * For project managers the user must be additional of the group of the project manager group (assigned to this task) * or if no project manager group is available for this task the user should be a member of * {@link ProjectForgeGroup#PROJECT_MANAGER}. * * @see org.projectforge.business.user.UserRightAccessCheck#hasSelectAccess(java.lang.Object) */ @Override public boolean hasAccess(final PFUserDO user, final GanttChartDO obj, final GanttChartDO oldObj, final OperationType operationType) { if (obj == null) { return false; } final GanttChartDO gc = oldObj != null ? oldObj : obj; return hasAccess(user, gc, gc.getWriteAccess()); }