summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-04-11 20:22:38 -0500
committerEndi Sukma Dewata <edewata@people01.fedoraproject.org>2011-04-14 23:05:09 +0000
commite3ec1fb7efb12c3669855b6c388f196c268680ee (patch)
tree9a582745ccbb71444fe20aa668f461dbd47329f8 /ipalib
parent805b94f22d42eddee42ed8772aca89036edb8399 (diff)
downloadfreeipa-e3ec1fb7efb12c3669855b6c388f196c268680ee.tar.gz
freeipa-e3ec1fb7efb12c3669855b6c388f196c268680ee.tar.xz
freeipa-e3ec1fb7efb12c3669855b6c388f196c268680ee.zip
Entitlement registration.
The entitlement facet will show buttons according to the entitlement status. If it's unregistered, the facet will show a Register button. If it's registered, the facet will show a Consume button.
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/baseldap.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 0dcb89039..7090acc69 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -633,7 +633,7 @@ class LDAPCreate(CallbackInterface, crud.Create):
# list of attributes we want exported to JSON
json_friendly_attributes = (
- 'takes_options',
+ 'takes_args', 'takes_options',
)
def __json__(self):
@@ -655,6 +655,16 @@ class LDAPQuery(CallbackInterface, crud.PKQuery):
for arg in super(crud.PKQuery, self).get_args():
yield arg
+ # list of attributes we want exported to JSON
+ json_friendly_attributes = (
+ 'takes_args', 'takes_options',
+ )
+
+ def __json__(self):
+ json_dict = dict(
+ (a, getattr(self, a)) for a in self.json_friendly_attributes
+ )
+ return json_dict
class LDAPMultiQuery(LDAPQuery):
"""
@@ -1445,6 +1455,16 @@ class LDAPSearch(CallbackInterface, crud.Search):
def exc_callback(self, args, options, exc, call_func, *call_args, **call_kwargs):
raise exc
+ # list of attributes we want exported to JSON
+ json_friendly_attributes = (
+ 'takes_options',
+ )
+
+ def __json__(self):
+ json_dict = dict(
+ (a, getattr(self, a)) for a in self.json_friendly_attributes
+ )
+ return json_dict
class LDAPModReverseMember(LDAPQuery):
"""