summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2009-11-02 12:59:40 +0100
committerRob Crittenden <rcritten@redhat.com>2009-11-18 14:40:53 -0500
commit2bbdf7be0ddd05897bb217259b875e9e28c0f862 (patch)
tree49a26384490d01d7f3fb73e50284eb622e4ec1cb /ipalib
parente1e2e020a748e115a5945a6e5ea44b50a3b98b94 (diff)
downloadfreeipa-2bbdf7be0ddd05897bb217259b875e9e28c0f862.tar.gz
freeipa-2bbdf7be0ddd05897bb217259b875e9e28c0f862.tar.xz
freeipa-2bbdf7be0ddd05897bb217259b875e9e28c0f862.zip
Handle ipaEnabledFlag as bool (TRUE/FALSE) instead of string (enabled/disabled).
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/hbac.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/ipalib/plugins/hbac.py b/ipalib/plugins/hbac.py
index 6fd2f912e..34dbae07e 100644
--- a/ipalib/plugins/hbac.py
+++ b/ipalib/plugins/hbac.py
@@ -41,7 +41,7 @@ class hbac(LDAPObject):
attribute_names = {
'cn': 'name',
'accessruletype': 'type',
- 'ipaenabledflag': 'status',
+ 'ipaenabledflag': 'enabled',
'servicename': 'service',
'ipauniqueid': 'unique id',
'memberuser user': 'affected users',
@@ -113,7 +113,7 @@ class hbac_add(LDAPCreate):
msg = 'HBAC rule with name "%s" already exists' % keys[-1]
raise errors.DuplicateEntry(message=msg)
# HBAC rules are enabled by default
- entry_attrs['ipaenabledflag'] = 'enabled'
+ entry_attrs['ipaenabledflag'] = 'TRUE'
return ldap.make_dn(
entry_attrs, self.obj.uuid_attribute, self.obj.container_dn
)
@@ -161,7 +161,7 @@ class hbac_enable(LDAPQuery):
ldap = self.obj.backend
dn = self.obj.get_dn(cn)
- entry_attrs = {'ipaenabledflag': 'enabled'}
+ entry_attrs = {'ipaenabledflag': 'TRUE'}
try:
ldap.update_entry(dn, entry_attrs)
@@ -185,7 +185,7 @@ class hbac_disable(LDAPQuery):
ldap = self.obj.backend
dn = self.obj.get_dn(cn)
- entry_attrs = {'ipaenabledflag': 'disabled'}
+ entry_attrs = {'ipaenabledflag': 'FALSE'}
try:
ldap.update_entry(dn, entry_attrs)