use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.
the class LDAPUserGroupCallbackImplTest method testGroupsObjectScopeRolesContext.
@Test
public void testGroupsObjectScopeRolesContext() {
UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallbackWithRoleCtx(SearchScope.OBJECT_SCOPE, "ou=Roles,dc=jbpm,dc=org");
assertGroups(ldapUserGroupCallback, false, false, false, false);
}
use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.
the class LDAPUserGroupCallbackImplTest method testGroupsSubtreeScopeManagerContext.
@Test
public void testGroupsSubtreeScopeManagerContext() {
UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallbackWithRoleCtx(SearchScope.SUBTREE_SCOPE, "cn=manager,ou=Roles,dc=jbpm,dc=org");
assertGroups(ldapUserGroupCallback, true, false, false, false);
}
use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.
the class LDAPUserGroupCallbackImplTest method testGroupsSubtreeScopeEngContext.
@Test
public void testGroupsSubtreeScopeEngContext() {
UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallbackWithRoleCtx(SearchScope.SUBTREE_SCOPE, "ou=ENG,ou=Roles,dc=jbpm,dc=org");
assertGroups(ldapUserGroupCallback, false, false, true, true);
}
use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.
the class LDAPUserGroupCallbackImplTest method testGroupExistsSystemProperties.
@Test
public void testGroupExistsSystemProperties() {
UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallback(Configuration.SYSTEM);
Assertions.assertThat(ldapUserGroupCallback).isNotNull();
boolean groupExists = ldapUserGroupCallback.existsGroup("manager");
Assertions.assertThat(groupExists).isTrue();
}
use of org.kie.api.task.UserGroupCallback in project jbpm by kiegroup.
the class LDAPUserGroupCallbackImplTest method testGroupsForUserSystemProperties.
@Test
public void testGroupsForUserSystemProperties() {
UserGroupCallback ldapUserGroupCallback = createLdapUserGroupCallback(Configuration.SYSTEM);
Assertions.assertThat(ldapUserGroupCallback).isNotNull();
List<String> userGroups = ldapUserGroupCallback.getGroupsForUser("john");
Assertions.assertThat(userGroups).hasSize(1);
}
Aggregations