summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/selfservice.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib/plugins/selfservice.py')
-rw-r--r--ipalib/plugins/selfservice.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipalib/plugins/selfservice.py b/ipalib/plugins/selfservice.py
index 6d34715a..63c40f68 100644
--- a/ipalib/plugins/selfservice.py
+++ b/ipalib/plugins/selfservice.py
@@ -67,6 +67,9 @@ class selfservice(Object):
Selfservice object.
"""
+ bindable = False
+ object_name = 'selfservice',
+ object_name_plural = 'selfservice',
label = _('Permissions')
takes_params = (
@@ -89,6 +92,17 @@ class selfservice(Object):
),
)
+ def __json__(self):
+ json_friendly_attributes = (
+ 'label', 'takes_params', 'bindable', 'name',
+ 'object_name', 'object_name_plural',
+ )
+ json_dict = dict(
+ (a, getattr(self, a)) for a in json_friendly_attributes
+ )
+ json_dict['methods'] = [m for m in self.methods]
+ return json_dict
+
api.register(selfservice)