summaryrefslogtreecommitdiffstats
path: root/install/ui/hbac.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/ui/hbac.js')
-rw-r--r--install/ui/hbac.js56
1 files changed, 38 insertions, 18 deletions
diff --git a/install/ui/hbac.js b/install/ui/hbac.js
index 4199c269..31f789a8 100644
--- a/install/ui/hbac.js
+++ b/install/ui/hbac.js
@@ -23,10 +23,15 @@
/* REQUIRES: ipa.js, details.js, search.js, add.js, facet.js, entity.js */
-IPA.entity_factories.hbacrule = function() {
- return IPA.entity_builder().
- entity('hbacrule').
- search_facet({
+IPA.hbac = {};
+
+IPA.hbac.rule_entity = function(spec) {
+
+ var that = IPA.entity(spec);
+
+ that.init = function(params) {
+
+ params.builder.search_facet({
search_all: true,
columns: [
'cn',
@@ -39,14 +44,19 @@ IPA.entity_factories.hbacrule = function() {
}).
adder_dialog({
fields: [ 'cn' ]
- }).
- build();
+ });
+ };
+
+ return that;
};
-IPA.entity_factories.hbacsvc = function() {
- return IPA.entity_builder().
- entity('hbacsvc').
- search_facet({
+IPA.hbac.service_entity = function(spec) {
+
+ var that = IPA.entity(spec);
+
+ that.init = function(params) {
+
+ params.builder.search_facet({
columns: [
'cn',
'description'
@@ -99,15 +109,19 @@ IPA.entity_factories.hbacsvc = function() {
name: 'description'
}
]
- }).
- build();
+ });
+ };
+
+ return that;
};
+IPA.hbac.service_group_entity = function(spec) {
+
+ var that = IPA.entity(spec);
+
+ that.init = function(params) {
-IPA.entity_factories.hbacsvcgroup = function() {
- return IPA.entity_builder().
- entity('hbacsvcgroup').
- search_facet({
+ params.builder.search_facet({
columns: [
'cn',
'description'
@@ -159,8 +173,10 @@ IPA.entity_factories.hbacsvcgroup = function() {
name: 'description'
}
]
- }).
- build();
+ });
+ };
+
+ return that;
};
IPA.hbacrule_details_facet = function(spec) {
@@ -557,3 +573,7 @@ IPA.hbacrule_details_facet = function(spec) {
return that;
};
+
+IPA.register('hbacrule', IPA.hbac.rule_entity);
+IPA.register('hbacsvc', IPA.hbac.service_entity);
+IPA.register('hbacsvcgroup', IPA.hbac.service_group_entity);