Related to issue 24505: Fixes testADataAccessLevel test
authorAugusto Mauch <augusto.mauch@openbravo.com>
Thu, 22 Aug 2013 10:51:09 +0200
changeset 21011 efc3e16e8116
parent 21010 69875a4590b9
child 21012 63599aca768e
Related to issue 24505: Fixes testADataAccessLevel test

The test testADataAccessLevel does not apply to entities based on datasources, because they are not associated with a database table.
src-test/org/openbravo/test/security/AccessLevelTest.java
--- a/src-test/org/openbravo/test/security/AccessLevelTest.java	Wed Aug 21 18:59:06 2013 +0200
+++ b/src-test/org/openbravo/test/security/AccessLevelTest.java	Thu Aug 22 10:51:09 2013 +0200
@@ -119,6 +119,10 @@
     final Client clientZero = OBDal.getInstance().get(Client.class, "0");
     final Organization orgZero = OBDal.getInstance().get(Organization.class, "0");
     for (Entity e : entities) {
+      if (e.isDataSourceBased()) {
+        // The entity is not associated with a database table, so it does not apply
+        continue;
+      }
       final StringBuilder where = new StringBuilder();
       final List<Object> params = new ArrayList<Object>();
       if (e.getAccessLevel() == AccessLevel.ALL) {