Search in sources :

Example 36 with UserGroupCallback

use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.

the class LDAPUserGroupCallbackImplTest method testUsersOneLevelScopePeopleContext.

@Test
public void testUsersOneLevelScopePeopleContext() {
    UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallbackWithUserCtx(SearchScope.ONELEVEL_SCOPE, "ou=People,dc=jbpm,dc=org");
    assertUsers(ldapUserGroupCallback, true, true, false, false);
}
Also used : UserGroupCallback(org.kie.api.task.UserGroupCallback) Test(org.junit.Test)

Example 37 with UserGroupCallback

use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.

the class LDAPUserGroupCallbackImplTest method testGroupsOneLevelScopeBaseDnContext.

@Test
public void testGroupsOneLevelScopeBaseDnContext() {
    UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallbackWithRoleCtx(SearchScope.ONELEVEL_SCOPE, "dc=jbpm,dc=org");
    assertGroups(ldapUserGroupCallback, false, false, false, false);
}
Also used : UserGroupCallback(org.kie.api.task.UserGroupCallback) Test(org.junit.Test)

Example 38 with UserGroupCallback

use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.

the class LDAPUserGroupCallbackImplTest method testGroupsOneLevelScopeRolesContext.

@Test
public void testGroupsOneLevelScopeRolesContext() {
    UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallbackWithRoleCtx(SearchScope.ONELEVEL_SCOPE, "ou=Roles,dc=jbpm,dc=org");
    assertGroups(ldapUserGroupCallback, true, true, false, false);
}
Also used : UserGroupCallback(org.kie.api.task.UserGroupCallback) Test(org.junit.Test)

Example 39 with UserGroupCallback

use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.

the class LDAPUserGroupCallbackImplTest method testUsersSubtreeScopePeopleContext.

@Test
public void testUsersSubtreeScopePeopleContext() {
    UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallbackWithUserCtx(SearchScope.SUBTREE_SCOPE, "ou=People,dc=jbpm,dc=org");
    assertUsers(ldapUserGroupCallback, true, true, true, true);
}
Also used : UserGroupCallback(org.kie.api.task.UserGroupCallback) Test(org.junit.Test)

Example 40 with UserGroupCallback

use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.

the class LDAPUserGroupCallbackImplTest method testGroupsOneLevelScopeManagerContext.

@Test
public void testGroupsOneLevelScopeManagerContext() {
    UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallbackWithRoleCtx(SearchScope.ONELEVEL_SCOPE, "cn=manager,ou=Roles,dc=jbpm,dc=org");
    assertGroups(ldapUserGroupCallback, false, false, false, false);
}
Also used : UserGroupCallback(org.kie.api.task.UserGroupCallback) Test(org.junit.Test)

Aggregations

UserGroupCallback (org.kie.api.task.UserGroupCallback)47 Test (org.junit.Test)41 Properties (java.util.Properties)10 ArrayList (java.util.ArrayList)8 JBossUserGroupCallbackImpl (org.jbpm.services.task.identity.JBossUserGroupCallbackImpl)8 HashMap (java.util.HashMap)7 KieSession (org.kie.api.runtime.KieSession)6 RuntimeEngine (org.kie.api.runtime.manager.RuntimeEngine)6 ProcessInstance (org.kie.api.runtime.process.ProcessInstance)6 WorkflowProcessInstance (org.jbpm.workflow.instance.WorkflowProcessInstance)5 RuntimeEnvironment (org.kie.api.runtime.manager.RuntimeEnvironment)5 List (java.util.List)4 Status (org.kie.api.task.model.Status)4 TaskSummary (org.kie.api.task.model.TaskSummary)4 UserTransaction (javax.transaction.UserTransaction)3 NodeLeftCountDownProcessEventListener (org.jbpm.test.listener.NodeLeftCountDownProcessEventListener)3 DefaultProcessEventListener (org.kie.api.event.process.DefaultProcessEventListener)3 ProcessEventListener (org.kie.api.event.process.ProcessEventListener)3 ProcessNodeLeftEvent (org.kie.api.event.process.ProcessNodeLeftEvent)3 SessionNotFoundException (org.kie.internal.runtime.manager.SessionNotFoundException)3