use of org.olat.modules.qpool.Pool in project openolat by klemens.
the class PoolDAOTest method createPool_withOwner.
@Test
public void createPool_withOwner() {
Identity id = JunitTestHelper.createAndPersistIdentityAsUser("Pool-owner-" + UUID.randomUUID().toString());
Pool pool = poolDao.createPool(id, "NGC owned", true);
Assert.assertNotNull(pool);
dbInstance.commitAndCloseSession();
}
use of org.olat.modules.qpool.Pool in project openolat by klemens.
the class QuestionPoolServiceImpl method removeOwners.
@Override
public void removeOwners(List<Identity> owners, List<Pool> pools) {
if (owners == null || owners.isEmpty() || pools == null || pools.isEmpty()) {
// nothing to do
return;
}
List<SecurityGroup> secGroups = new ArrayList<SecurityGroup>(pools.size());
for (Pool pool : pools) {
SecurityGroup secGroup = ((PoolImpl) pool).getOwnerGroup();
secGroups.add(secGroup);
}
securityManager.removeIdentityFromSecurityGroups(owners, secGroups);
}
Aggregations