From 8c4561a1ea598f645c33a8ed2f0c841326b2373d Mon Sep 17 00:00:00 2001 From: Pavel Vomacka Date: Thu, 14 Dec 2017 15:14:03 +0100 Subject: [PATCH] WebUI: make keytab tables on service and host pages writable There is no object class before adding the first item into tables, therefore there are no ACI and WebUI is not able to figure out whether table is writable or not. Adding flag 'w_if_no_aci' tells "make it writable even if we have not ACIs and try to do the API call. https://pagure.io/freeipa/issue/7111 Reviewed-By: Felipe Volpone --- install/ui/src/freeipa/host.js | 8 ++++++++ install/ui/src/freeipa/service.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js index ac434d8455384ded2cbebc28445deaecbafc46b5..acecff1e5b99c541b216a3e6789efb77eb262fef 100644 --- a/install/ui/src/freeipa/host.js +++ b/install/ui/src/freeipa/host.js @@ -198,6 +198,7 @@ return { $type: 'association_table', id: 'host_ipaallowedtoperform_read_keys_user', name: 'ipaallowedtoperform_read_keys_user', + flags: ['w_if_no_aci'], add_method: 'allow_retrieve_keytab', remove_method: 'disallow_retrieve_keytab', add_title: '@i18n:keytab.add_retrive', @@ -214,6 +215,7 @@ return { $type: 'association_table', id: 'host_ipaallowedtoperform_read_keys_group', name: 'ipaallowedtoperform_read_keys_group', + flags: ['w_if_no_aci'], add_method: 'allow_retrieve_keytab', remove_method: 'disallow_retrieve_keytab', add_title: '@i18n:keytab.add_retrive', @@ -230,6 +232,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_read_keys_host', name: 'ipaallowedtoperform_read_keys_host', + flags: ['w_if_no_aci'], add_method: 'allow_retrieve_keytab', remove_method: 'disallow_retrieve_keytab', add_title: '@i18n:keytab.add_retrive', @@ -246,6 +249,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_read_keys_hostgroup', name: 'ipaallowedtoperform_read_keys_hostgroup', + flags: ['w_if_no_aci'], add_method: 'allow_retrieve_keytab', remove_method: 'disallow_retrieve_keytab', add_title: '@i18n:keytab.add_retrive', @@ -269,6 +273,7 @@ return { $type: 'association_table', id: 'host_ipaallowedtoperform_write_keys_user', name: 'ipaallowedtoperform_write_keys_user', + flags: ['w_if_no_aci'], add_method: 'allow_create_keytab', remove_method: 'disallow_create_keytab', add_title: '@i18n:keytab.add_create', @@ -285,6 +290,7 @@ return { $type: 'association_table', id: 'host_ipaallowedtoperform_write_keys_group', name: 'ipaallowedtoperform_write_keys_group', + flags: ['w_if_no_aci'], add_method: 'allow_create_keytab', remove_method: 'disallow_create_keytab', add_title: '@i18n:keytab.add_create', @@ -301,6 +307,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_write_keys_host', name: 'ipaallowedtoperform_write_keys_host', + flags: ['w_if_no_aci'], add_method: 'allow_create_keytab', remove_method: 'disallow_create_keytab', add_title: '@i18n:keytab.add_create', @@ -317,6 +324,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_write_keys_hostgroup', name: 'ipaallowedtoperform_write_keys_hostgroup', + flags: ['w_if_no_aci'], add_method: 'allow_create_keytab', remove_method: 'disallow_create_keytab', add_title: '@i18n:keytab.add_create', diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js index 752ff98e3e5290442ce5f011a4de53ccc0db8f8f..c798d2999fc909fdbc26b016e4752a3edf1f702e 100644 --- a/install/ui/src/freeipa/service.js +++ b/install/ui/src/freeipa/service.js @@ -201,6 +201,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_read_keys_user', name: 'ipaallowedtoperform_read_keys_user', + flags: ['w_if_no_aci'], add_method: 'allow_retrieve_keytab', remove_method: 'disallow_retrieve_keytab', add_title: '@i18n:keytab.add_retrive', @@ -217,6 +218,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_read_keys_group', name: 'ipaallowedtoperform_read_keys_group', + flags: ['w_if_no_aci'], add_method: 'allow_retrieve_keytab', remove_method: 'disallow_retrieve_keytab', add_title: '@i18n:keytab.add_retrive', @@ -233,6 +235,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_read_keys_host', name: 'ipaallowedtoperform_read_keys_host', + flags: ['w_if_no_aci'], add_method: 'allow_retrieve_keytab', remove_method: 'disallow_retrieve_keytab', add_title: '@i18n:keytab.add_retrive', @@ -249,6 +252,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_read_keys_hostgroup', name: 'ipaallowedtoperform_read_keys_hostgroup', + flags: ['w_if_no_aci'], add_method: 'allow_retrieve_keytab', remove_method: 'disallow_retrieve_keytab', add_title: '@i18n:keytab.add_retrive', @@ -272,6 +276,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_write_keys_user', name: 'ipaallowedtoperform_write_keys_user', + flags: ['w_if_no_aci'], add_method: 'allow_create_keytab', remove_method: 'disallow_create_keytab', add_title: '@i18n:keytab.add_create', @@ -288,6 +293,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_write_keys_group', name: 'ipaallowedtoperform_write_keys_group', + flags: ['w_if_no_aci'], add_method: 'allow_create_keytab', remove_method: 'disallow_create_keytab', add_title: '@i18n:keytab.add_create', @@ -304,6 +310,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_write_keys_host', name: 'ipaallowedtoperform_write_keys_host', + flags: ['w_if_no_aci'], add_method: 'allow_create_keytab', remove_method: 'disallow_create_keytab', add_title: '@i18n:keytab.add_create', @@ -320,6 +327,7 @@ return { $type: 'association_table', id: 'service_ipaallowedtoperform_write_keys_hostgroup', name: 'ipaallowedtoperform_write_keys_hostgroup', + flags: ['w_if_no_aci'], add_method: 'allow_create_keytab', remove_method: 'disallow_create_keytab', add_title: '@i18n:keytab.add_create', -- 2.13.6