コード例 #1
0
 private void cleanupUserAndRoles(final ITenant tenant) {
   loginAsRepositoryAdmin();
   for (IPentahoRole role : userRoleDao.getRoles(tenant)) {
     userRoleDao.deleteRole(role);
   }
   for (IPentahoUser user : userRoleDao.getUsers(tenant)) {
     userRoleDao.deleteUser(user);
   }
 }
コード例 #2
0
 private void cleanupUserAndRoles(String userName, ITenant tenant) {
   login(
       userName,
       tenant,
       new String[] {tenantAdminAuthorityName, tenantAuthenticatedAuthorityName});
   for (IPentahoRole role : userRoleDao.getRoles()) {
     userRoleDao.deleteRole(role);
   }
   for (IPentahoUser user : userRoleDao.getUsers()) {
     userRoleDao.deleteUser(user);
   }
   logout();
 }
 private void cleanupUserAndRoles(final ITenant tenant) {
   loginAsRepositoryAdmin();
   for (IPentahoRole role : userRoleDao.getRoles(tenant)) {
     try {
       userRoleDao.deleteRole(role);
     } catch (Exception e) {
       // System role deletion will throw Exception
     }
   }
   for (IPentahoUser user : userRoleDao.getUsers(tenant)) {
     userRoleDao.deleteUser(user);
   }
 }