URL: https://github.com/freeipa/freeipa/pull/4963 Author: abbra Title: #4963: [Backport][ipa-4-8] WebUI: Fix error "unknown command 'idoverrideuser_add_member'" Action: opened
PR body: """ This PR was opened automatically because PR #4925 was pushed to master and backport to ipa-4-8 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/4963/head:pr4963 git checkout pr4963
From e3168513da77990071bdf793f154a783822fc016 Mon Sep 17 00:00:00 2001 From: Serhii Tsymbaliuk <[email protected]> Date: Thu, 16 Jul 2020 18:52:24 +0200 Subject: [PATCH 1/2] WebUI: Fix error "unknown command 'idoverrideuser_add_member'" There was wrong IPA.associator class used for 'Groups' -> 'User ID overrides' association, as a result a wrong command was sent to the server. Ticket: https://pagure.io/freeipa/issue/8416 Signed-off-by: Serhii Tsymbaliuk <[email protected]> --- install/ui/src/freeipa/group.js | 1 - 1 file changed, 1 deletion(-) diff --git a/install/ui/src/freeipa/group.js b/install/ui/src/freeipa/group.js index 2984bd4b20..61c19a82fe 100644 --- a/install/ui/src/freeipa/group.js +++ b/install/ui/src/freeipa/group.js @@ -209,7 +209,6 @@ return { { $type: 'association', name: 'member_idoverrideuser', - associator: IPA.serial_associator, add_title: '@i18n:objects.group.add_idoverride_user', remove_title: '@i18n:objects.group.remove_idoverride_users', columns: [ From 8d8db7d1a2ede0d42b2218aba837f64e4c266bc8 Mon Sep 17 00:00:00 2001 From: Serhii Tsymbaliuk <[email protected]> Date: Wed, 29 Jul 2020 09:41:36 +0200 Subject: [PATCH 2/2] WebUI tests: Add test case to cover user ID override feature The test case includes adding an user ID override to Default Trust View and adding the ID override to some IPA group. Ticket: https://pagure.io/freeipa/issue/8416 Signed-off-by: Serhii Tsymbaliuk <[email protected]> --- ipatests/test_webui/test_trust.py | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/ipatests/test_webui/test_trust.py b/ipatests/test_webui/test_trust.py index c04c2fcd87..605f8a2a78 100644 --- a/ipatests/test_webui/test_trust.py +++ b/ipatests/test_webui/test_trust.py @@ -21,6 +21,8 @@ Trust tests """ +import ipatests.test_webui.data_group as group +import ipatests.test_webui.data_idviews as idview from ipatests.test_webui.ui_driver import UI_driver from ipatests.test_webui.ui_driver import screenshot from ipatests.test_webui.task_range import range_tasks @@ -29,6 +31,8 @@ ENTITY = 'trust' CONFIG_ENTITY = 'trustconfig' +DEFAULT_TRUST_VIEW = 'Default Trust View' + CONFIG_DATA = { 'mod': [ ['combobox', 'ipantfallbackprimarygroup', 'admins'], @@ -164,3 +168,40 @@ def test_config_mod(self): self.mod_record(CONFIG_ENTITY, CONFIG_DATA) self.mod_record(CONFIG_ENTITY, CONFIG_DATA2) + + @screenshot + def test_group_member_idoverrideuser(self): + + self.init_app() + + # Create new trust + data = self.get_data() + self.add_record(ENTITY, data) + + # Create an user ID override + ad_domain = self.config.get('ad_domain') + ad_admin = self.config.get('ad_admin') + idoverrideuser_pkey = '{}@{}'.format(ad_admin, ad_domain).lower() + + self.navigate_to_record(DEFAULT_TRUST_VIEW, entity=idview.ENTITY) + self.add_record(idview.ENTITY, { + 'pkey': idoverrideuser_pkey, + 'add': [ + ('textbox', 'ipaanchoruuid_default', idoverrideuser_pkey), + ], + }, facet='idoverrideuser') + + # Create new group and add the user ID override there + self.navigate_to_entity(group.ENTITY) + self.add_record(group.ENTITY, group.DATA) + self.navigate_to_record(group.PKEY) + self.add_associations([idoverrideuser_pkey], + facet='member_idoverrideuser', delete=True) + + # Clean up data + self.navigate_to_entity(group.ENTITY) + self.delete_record(group.PKEY) + self.navigate_to_record(DEFAULT_TRUST_VIEW, entity=idview.ENTITY) + self.delete_record(idoverrideuser_pkey) + self.navigate_to_entity(ENTITY) + self.delete_record(ad_domain)
_______________________________________________ FreeIPA-devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/[email protected]
