Univention Bugzilla – Bug 35315
wrong references policy is displayed
Last modified: 2023-03-25 06:50:07 CET
+++ This bug was initially created as a clone of Bug #33344 +++ When opening more than one policy the referenced policy is always displayed as the same. We should write a UCS test for this specific error (TDD). This test should be disabled and will get re-enabled when the UMC bug is fixed.
The 'Referencing objects' of the policies in the UMC are retrieved via the 'umcp/command/udm/syntax/choices' request with an LDAP_Search filter like "(&(objectClass=univentionPolicyReference)(univentionPolicyReference=cn=umc_test_policy2,cn=policies,dc=dgalkin,dc=dev))" for instance. Testing this specific UMC command might not be helpful, since the bug seems to be only in the front-end and might be connected with the browser cache, due to following: Simple test case I've tried: 1. Create two users: 'umc_test_user1' and 'umc_test_user2'; 2. Create two password policies 'umc_test_policy1' and 'umc_test_policy2'; 3. Assign 'umc_test_policy1' to 'umc_test_user1'; 4. Assign 'umc_test_policy2' to 'umc_test_user2'; 5. Force page (with UMC) reload with cache flush (Ctrl+F5); 6. Open 'Referencing objects' for policy 'umc_test_policy1' -> the result will be correct: 'umc_test_user1'; 7. Open 'Referencing objects' for policy 'umc_test_policy2' -> the result will be wrong: 'umc_test_user1'; 8. Looking at the requests that are done while opening 'Referencing objects' of the policies it is clear that the same request is done twice, i.e. opening of 'Referencing objects' for different policies will make the same request all the times. The request will be correct only for the first policy opened after the cache was flushed. 9. So, for described test case, opening the 'umc_test_policy2' would invoke a 'umcp/command/udm/syntax/choices' request with a wrong filter in payload options: "filter":"(&(objectClass=univentionPolicyReference)(univentionPolicyReference=cn=umc_test_policy1,cn=policies,dc=dgalkin,dc=dev))" Where the 'cn=umc_test_policy1' is wrong. Thus, wrong object references will be displayed.. The code in the background just builds-up the LDAP_Search command and should not make any further problems I believe.
Created attachment 6017 [details] umc_test_policy1 with correct request options
Created attachment 6018 [details] umc_test_policy2 with wrong request options and wrong referencing objects
Thanks for the investigation. As there is nothing to test, this bug is invalid.