#1857 [ipa webui] In adder_dialog, after selecting all, if an object is unselected, reflect that in header
Opened 7 years ago by rcritten. Modified 2 months ago

https://bugzilla.redhat.com/show_bug.cgi?id=740882

Description of problem:
For an HBAC rule, you can choose to add a Host in "Accessing" section. Then select the checkbox to select all Hosts in the list. When one of the hosts is unselected, the checkbox against the "Hosts" remains checked and should be cleared to indicate that all hosts are no longer selected.

Version-Release number of selected component (if applicable):
ipa-server-2.1.1-4.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1.Add and edit HBAC rule
2.Go to its Accessing section, and click to Add a Host
3.Checkbox 'Hosts' to select all hosts in the list
4. Uncheck one of the hosts in the list

Actual results:
The checkbox against 'Hosts' remains checked

Expected results:
The checkbox agains 'Hosts' should be unchecked

Additional info:

This may not be a bug. The checkbox at the top of all tables in the UI is used to help selecting/unselecting all rows in that table in case there are many of them. So this checkbox has 2 functions:

  1. When changed from unchecked to checked, it will select all rows regardless of their current states.
  2. When changed from checked to unchecked, it will unselect all rows regardless of their current states.

The tooltip on this checkbox also indicates what it will do when clicked (i.e. Select All or Unselect All). This checkbox does not change when a row is selected or unselected.

If we change the behavior as described in the bug, we will lose the functionality #2.

The columns used for seachc for user and groups are configurable. See the code in gipalib/plugins/group.py

def pre_callback(self, ldap, filter, attrs_list, base_dn, scope, args, *options):
...
search_kw = {}
config = ldap.get_ipa_config()[1]
attrs = config.get(self.obj.search_attributes_config, [])
if len(attrs) == 1 and isinstance(attrs[0], basestring):
search_attrs = attrs[0].split(',')
for a in search_attrs:
search_kw[a] = args[-1]
cflt = ldap.make_filter(search_kw, exact=False)

        filter = ldap.combine_filters((oflt, cflt), rules=ldap.MATCH_ALL

HBAC and so forth would basically have to do the same thing, but without reading from the config. We can probably hardcode the search_kw array to start.

Metadata Update from @rcritten:
- Issue assigned to edewata
- Issue set to the milestone: Tickets Deferred

2 years ago

Metadata Update from @pvomacka:
- Issue close_status updated to: None
- Issue tagged with: webui

2 years ago

Metadata Update from @stsymbal:
- Issue tagged with: bug

2 months ago

Login to comment on this ticket.

Metadata