Package org.openbravo.test.security
Class EntityAccessTest
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.test.datasource.BaseDataSourceTestDal
-
- org.openbravo.test.security.CrossOrganizationReference
-
- org.openbravo.test.security.EntityAccessTest
-
public class EntityAccessTest extends CrossOrganizationReference
Tests access on the basis of window and table definitions. Also tests derived read access. IMPORTANT: Test cases are called by one of them called testContent(). The name of the rest of the test cases NOT begin by "test...".- Author:
- mtaal
- See Also:
EntityAccessChecker
-
-
Field Summary
-
Fields inherited from class org.openbravo.test.security.CrossOrganizationReference
createdObjects, SPAIN_ORG, SPAIN_WAREHOUSE, USA_BP, USA_ORDER, USA_ORG, USA_WAREHOUSE
-
Fields inherited from class org.openbravo.test.datasource.BaseDataSourceTestDal
LOGIN, POST_METHOD, PWD
-
Fields inherited from class org.openbravo.test.base.OBBaseTest
DOLLAR, DOLLAR_ID, EURO, EURO_ID, QA_TEST_ADMIN_USER_ID, QA_TEST_CLIENT_ID, QA_TEST_ORG_ID, TEST_BP_CATEGORY_ID, TEST_CLIENT_ID, TEST_LOCATION_ID, TEST_ORDER_ID, TEST_ORG_ID, TEST_ORG_TREE, TEST_PRODUCT_ID, TEST_ROLE_ID, TEST_US_ORG_ID, TEST_USER_ID, TEST_WAREHOUSE_ID, TEST2_USER_ID, userIds, watchFailures
-
-
Constructor Summary
Constructors Constructor Description EntityAccessTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeOrgIsAllowedHavingComputedColumns()
Covers issue #36628: it was not possible to update organization if entity had computed columnsvoid
testACreateCurrency()
Creates test data, aCurrency
.void
testBDoNotExecutetestNonDeletable()
Test tries to remove theCurrency
.void
testCCheckDerivedReadableCurrency()
Checks the derived readable concept, only identifier fields of a derived readable object may be read.void
testDUpdateCurrencyDerivedRead()
Test derived readable on a set method, also there this check must be done.void
testENonReadable()
Checks non-readable, if an object/entity is not readable then it may not be read through theOBDal
.void
testFDeleteTestData()
Removes the test data by using the administrator account.-
Methods inherited from class org.openbravo.test.security.CrossOrganizationReference
createOrder, createOrder, createOrder, createOrderLine, createOrderLine, removeCreatedObjects, setRole
-
Methods inherited from class org.openbravo.test.datasource.BaseDataSourceTestDal
authenticate, changeProfile, doRequest, doRequest, doRequest, getLogin, getOpenbravoURL, getPassword, getSessionCsrfToken, logout
-
Methods inherited from class org.openbravo.test.base.OBBaseTest
addReadWriteAccess, classSetUp, commitTransaction, count, getConnectionProvider, getOneInstance, getRandomUser, getTestLogAppender, initializeDalLayer, initializeDisabledTestCases, initializeTestLogAppender, isErrorOccured, reportException, rollback, setLogStackTraces, setQAAdminContext, setSystemAdministratorContext, setTestAdminContext, setTestLogAppenderLevel, setTestUserContext, setUp, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
-
-
-
Method Detail
-
testACreateCurrency
public void testACreateCurrency()
Creates test data, aCurrency
.
-
testBDoNotExecutetestNonDeletable
public void testBDoNotExecutetestNonDeletable()
Test tries to remove theCurrency
. Which should fail as it is not deletable. After fixing issue #0010139, all entities are deletable. Therefore this test case is not going to be executed.
-
testCCheckDerivedReadableCurrency
public void testCCheckDerivedReadableCurrency()
Checks the derived readable concept, only identifier fields of a derived readable object may be read. Also checks the allowRead concept of a BaseOBObject (BaseOBObject.setAllowRead(boolean)
)
-
testDUpdateCurrencyDerivedRead
public void testDUpdateCurrencyDerivedRead()
Test derived readable on a set method, also there this check must be done.
-
testENonReadable
public void testENonReadable()
Checks non-readable, if an object/entity is not readable then it may not be read through theOBDal
.
-
testFDeleteTestData
public void testFDeleteTestData()
Removes the test data by using the administrator account.
-
changeOrgIsAllowedHavingComputedColumns
public void changeOrgIsAllowedHavingComputedColumns()
Covers issue #36628: it was not possible to update organization if entity had computed columns
-
-