Bug 35315 - wrong references policy is displayed
wrong references policy is displayed
Status: CLOSED INVALID
Product: UCS Test
Classification: Unclassified
Component: UMC
unspecified
All Linux
: P5 minor (vote)
: ---
Assigned To: Dmitry Galkin
Philipp Hahn
:
Depends on: 33344 38674
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-08 12:51 CEST by Philipp Hahn
Modified: 2023-03-25 06:50 CET (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
umc_test_policy1 with correct request options (169.81 KB, image/png)
2014-07-22 11:23 CEST, Dmitry Galkin
Details
umc_test_policy2 with wrong request options and wrong referencing objects (169.96 KB, image/png)
2014-07-22 11:24 CEST, Dmitry Galkin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-07-08 12:51:12 CEST
+++ 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.
Comment 1 Dmitry Galkin univentionstaff 2014-07-22 11:19:23 CEST
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.
Comment 2 Dmitry Galkin univentionstaff 2014-07-22 11:23:46 CEST
Created attachment 6017 [details]
umc_test_policy1 with correct request options
Comment 3 Dmitry Galkin univentionstaff 2014-07-22 11:24:30 CEST
Created attachment 6018 [details]
umc_test_policy2 with wrong request options and wrong referencing objects
Comment 4 Philipp Hahn univentionstaff 2014-07-22 13:27:27 CEST
Thanks for the investigation.
As there is nothing to test, this bug is invalid.