Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 584994 - when assigning ldap groups to role ui pagination wrong
when assigning ldap groups to role ui pagination wrong
Status: CLOSED WONTFIX
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
unspecified
All Linux
low Severity medium (vote)
: ---
: ---
Assigned To: Simeon Pinder
Corey Welton
:
Depends On:
Blocks: jon24-ldap
  Show dependency treegraph
 
Reported: 2010-04-22 16:40 EDT by Simeon Pinder
Modified: 2010-09-20 21:49 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-09-20 21:49:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Screenshot for 'Assign To Role' section pagination (89.82 KB, image/png)
2010-04-29 09:22 EDT, Sunil Kondkar
no flags Details
Screenshot for view role screen pagination (53.17 KB, image/png)
2010-05-13 07:31 EDT, Sunil Kondkar
no flags Details

  None (edit)
Description Simeon Pinder 2010-04-22 16:40:30 EDT
Description of problem: 
The pagination mechanism for the loaded available ldap groups for mapping is wrong.  When modifying a role to add new members to "Assigned LDAP Groups", on the first screen with available ldap groups to assign, attempt to change the amount of entries available per page from the default(15) to any other value. The reordered page no longer shows the available ldap groups anymore. 

Version-Release number of selected component (if applicable):


How reproducible:
Every time.

Steps to Reproduce:
1.Configure ldap server information for ldap authorization(server,groupsearch filter and member filter)
2.Create a new role for ldap users
3.While viewing the new role, click "Add To List" from the 'Assigned LDAP Groups' area.
4.Confirm that there are available ldap groups on left. 
5.Change the amount of displayed entries per page from 15 to any other value.
  
Actual results:
Available ldap groups is replaced with possibly empty list of groups from another page.

Expected results:
Available ldap groups should be correctly redisplayed in amounts of new pagination request amount.

Additional info:
Comment 1 Charles Crouch 2010-04-22 19:36:45 EDT
Simeon
You should double check that this feature is still working correctly on other parts of the site, before trying to fix this particular instance
Comment 2 Simeon Pinder 2010-04-27 13:18:18 EDT
Verified that issue is localized to ldap pagination.

Fixed in successful master build >= 259.

git hash bdbc5d990cd959005e9a7355fc1ba5c1296187d7

Details:
Existing pagination controls leverage same db PageControl mechanism used to group and sort requests to db.  Solution does not work for LDAP because there are no database calls where pca used, but just queries to ldap server returning PageLists of Maps of Strings. 
- modified the ldap group query results to be sorted/ordered to respond to same pagination widget controls
- cached ldap group list to avoid potentially expensive needless roundtrips to external server. 
- also added trim() to returned ldap description|name values to elimination pagination sorting issues with different ldap servers handling whitespace different ways.
- added ldapGroupForm.jsp so that pagination controls were correctly fed to the UI.
Comment 3 Sunil Kondkar 2010-04-29 09:20:49 EDT
Verified on jon build 120 (Revision: 10615)

There are two sections on screen to add ldap groups. Pagination on the left section(Groups) is working as expected. If user  selects values 15/30/45 from 'Items per page' dropdown, the section displays items accordingly.

However on the right section (Assign To Role), If user  selects values 15/30/45 from 'Items per page' dropdown, it displays all available items without pagination.
Please refer the attached screenshot.

Steps to reproduce:
1.Login to jon
2.Navigate to Administration->System Configurations->Settings
3.Enter below details in 'LDAP Configuration Properties' section and click OK button.

URL: ldap://win2k3red.test.pnq.com
Search Base: dc=test,dc=pnq,dc=com
Username: cn=Administrator,cn=Users,dc=test,dc=pnq,dc=com
Password: RedHat123
Search Filter: objectclass=*
Login Property: cn
Group Search Filter: objectclass=group
Group Member Filter: member

4.Navigate to Administration->Security->Roles
5.Click on 'ALL Resources Role' link.
6.Click on 'Add To List' button on 'Assigned LDAP Groups' section.
7.Select all the available groups in 'Groups' section (available groups should be more than 15)
8.Click on arrow button.
9.Verify pagination on 'Assign To Role' section.
10.If user  selects values 15/30/45 from 'Items per page' dropdown, it displays all available items without pagination.
Comment 4 Sunil Kondkar 2010-04-29 09:22:20 EDT
Created attachment 410105 [details]
Screenshot for 'Assign To Role' section pagination
Comment 5 Simeon Pinder 2010-05-07 17:21:26 EDT
Yep. My bad. Oversight. This is not fixed in successful builds of master >= 284.
git commit hash: 4d661b9aec44282fea747d60def24e44d6461caa
Comment 6 Sunil Kondkar 2010-05-13 07:30:15 EDT
Verified on latest jon build#136 (10615)

When assigning ldap groups to role, observed that pagination is working as expected on 'Groups' and 'Assign To Role' sections on on screen to add ldap groups.

However, observed that when user clicks OK button after selecting and assigning the ldap groups, these groups get listed in 'Assigned LDAP Groups' section on the view role screen. 

If user  selects values 15/30/45 from 'Items per page' dropdown, it displays all available items without pagination.

Please refer the attached screenshot.

Steps to reproduce:
1.Login to jon
2.Navigate to Administration->System Configurations->Settings
3.Enter below details in 'LDAP Configuration Properties' section and click OK
button.

URL: ldap://win2k3red.test.pnq.com
Search Base: dc=test,dc=pnq,dc=com
Username: cn=Administrator,cn=Users,dc=test,dc=pnq,dc=com
Password: RedHat123
Search Filter: objectclass=*
Login Property: cn
Group Search Filter: objectclass=group
Group Member Filter: member

4.Navigate to Administration->Security->Roles
5.Click on 'ALL Resources Role' link.
6.Click on 'Add To List' button on 'Assigned LDAP Groups' section.
7.Select and assign groups(more than 45)
8.Click on OK button.
9. User is navigated to the view role screen.
10. If user  selects values 15/30/45 from 'Items per page' dropdown, it displays
all available items without pagination.
Comment 7 Sunil Kondkar 2010-05-13 07:31:52 EDT
Created attachment 413722 [details]
Screenshot for view role screen pagination
Comment 8 Corey Welton 2010-09-20 21:49:30 EDT
clsoing per GWT effort

Note You need to log in before you can comment on or make changes to this bug.