pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0028-WebUI-make-keytab-tables-on-service-and-host-pages-w.patch

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