Package org.projectforge.access

Examples of org.projectforge.access.AccessEntryDO


  public GroupTaskAccessDO createGroupTaskAccess(final GroupDO group, final TaskDO task, final AccessType accessType,
      final boolean accessSelect, final boolean accessInsert, final boolean accessUpdate, final boolean accessDelete)
  {
    final GroupTaskAccessDO access = createGroupTaskAccess(group, task);
    final AccessEntryDO entry = access.ensureAndGetAccessEntry(accessType);
    entry.setAccess(accessSelect, accessInsert, accessUpdate, accessDelete);
    accessDao.internalUpdate(access);
    return access;
  }
View Full Code Here


  }

  private void initAccess()
  {
    GroupTaskAccessDO access = createGroupTaskAccess(getGroup("group1"), getTask("1"));
    final AccessEntryDO entry = access.ensureAndGetAccessEntry(AccessType.TASKS);
    entry.setAccess(true, true, true, true);
    accessDao.internalUpdate(access);

    // Create some test tasks with test access:
    addTask("testAccess", "root");
    addTask("ta_1_siud", "testAccess", "Testuser has all access rights: select, insert, update, delete");
View Full Code Here

  }

  private void setAllAccessEntries(final GroupTaskAccessDO access, final boolean selectAccess, final boolean insertAccess,
      final boolean updateAccess, final boolean deleteAccess)
  {
    AccessEntryDO entry = access.ensureAndGetAccessEntry(AccessType.TASK_ACCESS_MANAGEMENT);
    entry.setAccess(selectAccess, insertAccess, updateAccess, deleteAccess);
    entry = access.ensureAndGetAccessEntry(AccessType.TASKS);
    entry.setAccess(selectAccess, insertAccess, updateAccess, deleteAccess);
    entry = access.ensureAndGetAccessEntry(AccessType.TIMESHEETS);
    entry.setAccess(selectAccess, insertAccess, updateAccess, deleteAccess);
    entry = access.ensureAndGetAccessEntry(AccessType.OWN_TIMESHEETS);
    entry.setAccess(selectAccess, insertAccess, updateAccess, deleteAccess);
    accessDao.internalUpdate(access);
  }
View Full Code Here

    initialized = true;
    logon(getUser(TEST_ADMIN_USER));
    TaskDO task;
    task = initTestDB.addTask("TimesheetBookingTest", "root");
    final GroupTaskAccessDO access = new GroupTaskAccessDO().setGroup(initTestDB.addGroup("TBT", TEST_USER)).addAccessEntry(
        new AccessEntryDO(AccessType.OWN_TIMESHEETS, true, true, true, true)).setTask(task);
    accessDao.save(access);
    logon(getUser(TEST_FINANCE_USER));
    taskDao.update(initTestDB.addTask("TBT-1", "TimesheetBookingTest"));
    taskDao.update(initTestDB.addTask("TBT-1.1", "TBT-1").setStatus(TaskStatus.C));
    taskDao.markAsDeleted(initTestDB.addTask("TBT-1.2", "TBT-1"));
View Full Code Here

TOP

Related Classes of org.projectforge.access.AccessEntryDO

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.