#9932 Sudo command group API data still contains removed Sudo commands
Opened by carlmart. Modified

Issue

When a Sudo command is deleted from 'Sudo Commands' page, and it was member of a given Sudo Command Group, the deleted value is still visible in the 'Sudo Command Group' > 'Members' page. Also the data on the API response keeps showing this removed element.

Steps to Reproduce

  1. Create new Sudo commands: 'sudocmd1', 'sudocmd2', and 'sudocmd3'
  2. Create a new Sudo Command Group: 'sudocmdgroup'
  3. Click on 'sudocmdgroup' > 'Members' page
  4. Assign all the Sudo Commands defined above
  5. Go back to the 'Sudo Commands' page and delete 'sudocmd1'
  6. Go to 'sudocmdgroup' > 'Members' page. The 'sudocmd1' element is still in the table

Actual behavior

The deleted data is still member of the Sudo Command Group. The API reflects these changes.

Expected behavior

The API must not contain that value in order to not be displayed in the data table.


FWIW I was unable to reproduce this on the command-line:

$ ipa sudocmd-add sudocmd1
$ ipa sudocmd-add sudocmd2
$ ipa sudocmd-add sudocmd3
$ ipa sudocmdgrp-add sudocmdgroup
$ ipa sudocmdgroup-add-member sudocmdgroup --sudocmds={sudocmd1,sudocmd2,sudocmd3}
$ ipa sudocmd-del sudocmd1
$ ipa sudocmdgroup-show sudocmdgroup
  Sudo Command Group: sudocmdgroup
  Member Sudo commands: sudocmd2, sudocmd3

Metadata Update from @dhanina:
- Issue assigned to dhanina

Thank you for testing Rob, we think this is happening in both old and new webui, will revisit some time in the future.

Metadata