Class DataSourceSecurity


  • public class DataSourceSecurity
    extends BaseDataSourceTestDal
    Test cases to ensure that mechanism of security DataSource access is working properly.
    Author:
    inigo.sanchez
    • Constructor Detail

      • DataSourceSecurity

        public DataSourceSecurity​(org.openbravo.test.datasource.DataSourceSecurity.RoleType role,
                                  org.openbravo.test.datasource.DataSourceSecurity.DataSource dataSource,
                                  int expectedResponseStatus)
    • Method Detail

      • createNoAccessRoleAndGenericProduct

        public static void createNoAccessRoleAndGenericProduct()
        Creates dummy role without any access for testing purposes
      • fetchShouldBeAllowedOnlyIfRoleIsGranted

        public void fetchShouldBeAllowedOnlyIfRoleIsGranted()
                                                     throws Exception
        Tests datasource allows or denies fetch action based on role access
        Throws:
        Exception
      • cleanUp

        public static void cleanUp()
        Deletes dummy testing role and product