| | |
| | | TestCaseUtils.clearJEBackend(false,"userRoot", suffix); |
| | | } |
| | | |
| | | @BeforeMethod |
| | | public void clearBackend() throws Exception { |
| | | deleteAttrFromEntry(adminBase, "aci"); |
| | | deleteAttrFromAdminEntry(ACCESS_HANDLER_DN, ATTR_AUTHZ_GLOBAL_ACI); |
| | | } |
| | | |
| | | /** |
| | | * Test using ACI added to admin base containing "ref" attribute type name |
| | |
| | | */ |
| | | @Test() |
| | | public void testRef() throws Exception { |
| | | try { |
| | | String pwdLdifs = |
| | | makeAddLDIF("aci", adminBase, ALLOW_OC); |
| | | |
| | |
| | | LDAPSearchParams(level5User, PWD, null,null, null, |
| | | adminBase, filter, null); |
| | | Assert.assertTrue(isRefMap(userResults)); |
| | | } finally { |
| | | deleteAttrFromEntry(adminBase, "aci"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Test using ACI added to actual referral entry (added using ldifmodify |
| | | * passing manageDsaIT control). |
| | |
| | | */ |
| | | @Test() |
| | | public void testRefAci() throws Exception { |
| | | try { |
| | | String pwdLdifs = |
| | | makeAddLDIF("aci", smartReferralAdmin, ALLOW_OC); |
| | | //Add the ACI passing the manageDsaIT control. |
| | |
| | | LDAPSearchParams(level5User, PWD, null,null, null, |
| | | adminBase, filter, null); |
| | | Assert.assertTrue(isRefMap(userResults)); |
| | | } finally { |
| | | String delPwdLdifs = |
| | | makeDelLDIF("aci", smartReferralAdmin, ALLOW_OC); |
| | | //Delete the ACI passing the manageDsaIT control. |
| | | LDIFModify(delPwdLdifs, DIR_MGR_DN, PWD, ctrlString); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Test global ACI allowing the "ref" attribute type to be returned only if |
| | | * if the search is under the people base. A search under the admin base |
| | |
| | | */ |
| | | @Test() |
| | | public void testGlobalTargetAci() throws Exception { |
| | | try { |
| | | String pwdLdifs = |
| | | makeAddLDIF(ATTR_AUTHZ_GLOBAL_ACI, ACCESS_HANDLER_DN, ALLOW_PEOPLE); |
| | | LDIFAdminModify(pwdLdifs, DIR_MGR_DN, PWD); |
| | |
| | | LDAPSearchParams(level5User, PWD, null,null, null, |
| | | peopleBase, filter, null); |
| | | Assert.assertTrue(isRefMap(userResults1)); |
| | | } finally { |
| | | deleteAttrFromAdminEntry(ACCESS_HANDLER_DN, ATTR_AUTHZ_GLOBAL_ACI); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Test global ACI allowing the "ref" attribute type specifed by the |
| | | * plus operator. |
| | |
| | | */ |
| | | @Test() |
| | | public void testGlobalAci() throws Exception { |
| | | try { |
| | | String pwdLdifs = |
| | | makeAddLDIF(ATTR_AUTHZ_GLOBAL_ACI, ACCESS_HANDLER_DN, ALLOW_OC_PLUS); |
| | | LDIFAdminModify(pwdLdifs, DIR_MGR_DN, PWD); |
| | |
| | | LDAPSearchParams(level5User, PWD, null,null, null, |
| | | adminBase, filter, null); |
| | | Assert.assertTrue(isRefMap(userResults)); |
| | | } finally { |
| | | deleteAttrFromAdminEntry(ACCESS_HANDLER_DN, ATTR_AUTHZ_GLOBAL_ACI); |
| | | } |
| | | } |
| | | |
| | | |