Re: [Freeipa-devel] [PATCH] 834 Hide the HBAC access type attribute now that deny is deprecated.

2011-07-21 Thread Rob Crittenden

Martin Kosek wrote:

On Tue, 2011-07-19 at 20:49 -0400, Rob Crittenden wrote:

Hide the HBAC access type attribute now that deny is deprecated.

It won't appear in the UI/CLI but is still available via XML-RPC. allow
is the default and deny will be rejected.

This is not tested in the UI. I'm not sure if this is due to a problem
in my tree or something else.

https://fedorahosted.org/freeipa/ticket/1495

rob


ACK for the CLI part, tests are clean.

I checked WebUI, HBAC rules seem to be broken here. With or without your
patch. I see a list of rules, the type column is still here. That's OK,
there is already a ticket for this task - 1497.

However, when I select a HBAC rule to modify it, its data are not filled
at all to the edit fields. I will fill a ticket for this bug.

Martin



pushed to master and ipa-2-0

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 834 Hide the HBAC access type attribute now that deny is deprecated.

2011-07-19 Thread Rob Crittenden

Hide the HBAC access type attribute now that deny is deprecated.

It won't appear in the UI/CLI but is still available via XML-RPC. allow 
is the default and deny will be rejected.


This is not tested in the UI. I'm not sure if this is due to a problem 
in my tree or something else.


https://fedorahosted.org/freeipa/ticket/1495

rob
From 8d5f723e97cb2e9bfae3fad4ca24743903d156ab Mon Sep 17 00:00:00 2001
From: Rob Crittenden rcrit...@redhat.com
Date: Tue, 19 Jul 2011 20:46:20 -0400
Subject: [PATCH] Hide the HBAC access type attribute now that deny is deprecated.

It won't appear in the UI/CLI but is still available via XML-RPC.
allow is the default and deny will be rejected.

https://fedorahosted.org/freeipa/ticket/1495
---
 API.txt   |6 +++---
 ipalib/plugins/hbacrule.py|   10 ++
 tests/test_xmlrpc/test_hbac_plugin.py |1 -
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/API.txt b/API.txt
index 3d71504936647ccda7f9af9442497ba9138e99cd..0ceb3a757a26f2d259ad885ba5c745622c03 100644
--- a/API.txt
+++ b/API.txt
@@ -1021,7 +1021,7 @@ output: Output('value', type 'unicode', The primary_key value of the entry, e
 command: hbacrule_add
 args: 1,11,3
 arg: Str('cn', attribute=True, cli_name='name', label=Gettext('Rule name', domain='ipa', localedir=None), multivalue=False, primary_key=True, required=True)
-option: StrEnum('accessruletype', validate_type, attribute=True, autofill=True, cli_name='type', default=u'allow', label=Gettext('Rule type', domain='ipa', localedir=None), multivalue=False, required=True, values=(u'allow', u'deny'))
+option: StrEnum('accessruletype', validate_type, attribute=True, autofill=True, cli_name='type', default=u'allow', exclude='webui', flags=['no_option', 'no_output'], label=Gettext('Rule type', domain='ipa', localedir=None), multivalue=False, required=True, values=(u'allow', u'deny'))
 option: StrEnum('usercategory', attribute=True, cli_name='usercat', label=Gettext('User category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
 option: StrEnum('hostcategory', attribute=True, cli_name='hostcat', label=Gettext('Host category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
 option: StrEnum('sourcehostcategory', attribute=True, cli_name='srchostcat', label=Gettext('Source host category', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'all',))
@@ -1102,7 +1102,7 @@ command: hbacrule_find
 args: 1,12,4
 arg: Str('criteria?', noextrawhitespace=False)
 option: Str('cn', attribute=True, autofill=False, cli_name='name', label=Gettext('Rule name', domain='ipa', localedir=None), multivalue=False, primary_key=True, query=True, required=False)
-option: StrEnum('accessruletype', validate_type, attribute=True, autofill=False, cli_name='type', default=u'allow', label=Gettext('Rule type', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'allow', u'deny'))
+option: StrEnum('accessruletype', validate_type, attribute=True, autofill=False, cli_name='type', default=u'allow', exclude='webui', flags=['no_option', 'no_output'], label=Gettext('Rule type', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'allow', u'deny'))
 option: StrEnum('usercategory', attribute=True, autofill=False, cli_name='usercat', label=Gettext('User category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
 option: StrEnum('hostcategory', attribute=True, autofill=False, cli_name='hostcat', label=Gettext('Host category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
 option: StrEnum('sourcehostcategory', attribute=True, autofill=False, cli_name='srchostcat', label=Gettext('Source host category', domain='ipa', localedir=None), multivalue=False, query=True, required=False, values=(u'all',))
@@ -1120,7 +1120,7 @@ output: Output('truncated', type 'bool', 'True if not all results were returne
 command: hbacrule_mod
 args: 1,12,3
 arg: Str('cn', attribute=True, cli_name='name', label=Gettext('Rule name', domain='ipa', localedir=None), multivalue=False, primary_key=True, query=True, required=True)
-option: StrEnum('accessruletype', validate_type, attribute=True, autofill=False, cli_name='type', default=u'allow', label=Gettext('Rule type', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'allow', u'deny'))
+option: StrEnum('accessruletype', validate_type, attribute=True, autofill=False, cli_name='type', default=u'allow', exclude='webui', flags=['no_option', 'no_output'], label=Gettext('Rule type', domain='ipa', localedir=None), multivalue=False, required=False, values=(u'allow', u'deny'))
 option: StrEnum('usercategory', attribute=True, autofill=False, cli_name='usercat', label=Gettext('User category', domain='ipa', localedir=None), multivalue=False, required=False,