summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--install/static/Makefile.am1
-rw-r--r--install/static/index.xhtml1
-rw-r--r--install/static/rolegroup.js111
-rw-r--r--install/static/sampledata/rolegroup_add.json22
-rw-r--r--install/static/sampledata/rolegroup_add_member.json27
-rw-r--r--install/static/sampledata/rolegroup_del.json9
-rw-r--r--install/static/sampledata/rolegroup_find.json185
-rw-r--r--install/static/sampledata/rolegroup_remove_member.json24
-rw-r--r--install/static/sampledata/rolegroup_show.json20
-rw-r--r--install/static/webui.js1
10 files changed, 401 insertions, 0 deletions
diff --git a/install/static/Makefile.am b/install/static/Makefile.am
index 9bd327c7a..7d7c27d9a 100644
--- a/install/static/Makefile.am
+++ b/install/static/Makefile.am
@@ -28,6 +28,7 @@ app_DATA = \
navigation.js \
netgroup.js \
service.js \
+ rolegroup.js \
search.js \
details.js \
entity.js \
diff --git a/install/static/index.xhtml b/install/static/index.xhtml
index 98e2495db..3fcb5f625 100644
--- a/install/static/index.xhtml
+++ b/install/static/index.xhtml
@@ -25,6 +25,7 @@
<script type="text/javascript" src="hostgroup.js"></script>
<script type="text/javascript" src="netgroup.js"></script>
<script type="text/javascript" src="service.js"></script>
+ <script type="text/javascript" src="rolegroup.js"></script>
<script type="text/javascript" src="develop.js"></script>
<script type="text/javascript" src="webui.js"></script>
diff --git a/install/static/rolegroup.js b/install/static/rolegroup.js
new file mode 100644
index 000000000..2e52f1055
--- /dev/null
+++ b/install/static/rolegroup.js
@@ -0,0 +1,111 @@
+/* Authors:
+ * Endi Sukma Dewata <edewata@redhat.com>
+ *
+ * Copyright (C) 2010 Red Hat
+ * see file 'COPYING' for use and warranty information
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 only
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */
+
+ipa_entity_set_search_definition('rolegroup', [
+ ['cn', 'Role-group name', null],
+ ['description', 'Description', null],
+ ['quick_links', 'Quick Links', rolegroup_render_quick_links]
+]);
+
+ipa_entity_set_add_definition('rolegroup', [
+ 'dialog-add-rolegroup', 'Add New Rolegroup', [
+ ['cn', 'Name', null],
+ ['description', 'Description', null],
+ ]
+]);
+
+ipa_entity_set_details_definition('rolegroup', [
+ ['identity', 'Rolegroup Details', [
+ ['cn', 'Name', null],
+ ['description', 'Description', null],
+ ]]
+]);
+
+function rolegroup_render_quick_links(tr, attr, value, entry_attrs) {
+
+ var td = $("<td/>");
+ tr.append(td);
+
+ $("<a/>", {
+ href: "jslink",
+ html: $("<img src='rolegroup_details.png' />"),
+ click: function() {
+ var state = {};
+ state['rolegroup-facet'] = 'details';
+ state['rolegroup-pkey'] = entry_attrs['cn'][0];
+ $.bbq.pushState(state);
+ return false;
+ }
+ }).appendTo(td);
+
+ $("<a/>", {
+ href: "jslink",
+ html: $("<img src='user_member.png' />"),
+ click: function() {
+ var state = {};
+ state['rolegroup-facet'] = 'associate';
+ state['rolegroup-enroll'] = 'user';
+ state['rolegroup-pkey'] = entry_attrs['cn'][0];
+ $.bbq.pushState(state);
+ return false;
+ }
+ }).appendTo(td);
+
+ $("<a/>", {
+ href: "jslink",
+ html: $("<img src='group_member.png' />"),
+ click: function() {
+ var state = {};
+ state['rolegroup-facet'] = 'associate';
+ state['rolegroup-enroll'] = 'group';
+ state['rolegroup-pkey'] = entry_attrs['cn'][0];
+ $.bbq.pushState(state);
+ return false;
+ }
+ }).appendTo(td);
+
+ $("<a/>", {
+ href: "jslink",
+ html: $("<img src='host_member.png' />"),
+ click: function() {
+ var state = {};
+ state['rolegroup-facet'] = 'associate';
+ state['rolegroup-enroll'] = 'host';
+ state['rolegroup-pkey'] = entry_attrs['cn'][0];
+ $.bbq.pushState(state);
+ return false;
+ }
+ }).appendTo(td);
+
+ $("<a/>", {
+ href: "jslink",
+ html: $("<img src='hostgroup_member.png' />"),
+ click: function() {
+ var state = {};
+ state['rolegroup-facet'] = 'associate';
+ state['rolegroup-enroll'] = 'hostgroup';
+ state['rolegroup-pkey'] = entry_attrs['cn'][0];
+ $.bbq.pushState(state);
+ return false;
+ }
+ }).appendTo(td);
+}
diff --git a/install/static/sampledata/rolegroup_add.json b/install/static/sampledata/rolegroup_add.json
new file mode 100644
index 000000000..54e2c2832
--- /dev/null
+++ b/install/static/sampledata/rolegroup_add.json
@@ -0,0 +1,22 @@
+{
+ "error": null,
+ "id": 0,
+ "result": {
+ "result": {
+ "cn": [
+ "test"
+ ],
+ "description": [
+ "Test role"
+ ],
+ "dn": "cn=test,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "objectclass": [
+ "groupofnames",
+ "nestedgroup",
+ "top"
+ ]
+ },
+ "summary": "Added rolegroup \"test\"",
+ "value": "test"
+ }
+}
diff --git a/install/static/sampledata/rolegroup_add_member.json b/install/static/sampledata/rolegroup_add_member.json
new file mode 100644
index 000000000..e68ecc28b
--- /dev/null
+++ b/install/static/sampledata/rolegroup_add_member.json
@@ -0,0 +1,27 @@
+{
+ "error": null,
+ "id": 0,
+ "result": {
+ "completed": 1,
+ "failed": {
+ "member": {
+ "group": [],
+ "host": [],
+ "hostgroup": [],
+ "user": []
+ }
+ },
+ "result": {
+ "cn": [
+ "test"
+ ],
+ "description": [
+ "Test role"
+ ],
+ "dn": "cn=test,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "member_user": [
+ "admin"
+ ]
+ }
+ }
+}
diff --git a/install/static/sampledata/rolegroup_del.json b/install/static/sampledata/rolegroup_del.json
new file mode 100644
index 000000000..8af1e6306
--- /dev/null
+++ b/install/static/sampledata/rolegroup_del.json
@@ -0,0 +1,9 @@
+{
+ "error": null,
+ "id": 0,
+ "result": {
+ "result": true,
+ "summary": "Deleted rolegroup \"test\"",
+ "value": "test"
+ }
+}
diff --git a/install/static/sampledata/rolegroup_find.json b/install/static/sampledata/rolegroup_find.json
new file mode 100644
index 000000000..8ed2a76b7
--- /dev/null
+++ b/install/static/sampledata/rolegroup_find.json
@@ -0,0 +1,185 @@
+{
+ "error": null,
+ "id": 0,
+ "result": {
+ "count": 15,
+ "result": [
+ {
+ "cn": [
+ "helpdesk"
+ ],
+ "description": [
+ "Helpdesk"
+ ],
+ "dn": "cn=helpdesk,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "member_user": [
+ "edewata"
+ ]
+ },
+ {
+ "cn": [
+ "useradmin"
+ ],
+ "description": [
+ "User Administrators"
+ ],
+ "dn": "cn=useradmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ },
+ {
+ "cn": [
+ "groupadmin"
+ ],
+ "description": [
+ "Group Administrators"
+ ],
+ "dn": "cn=groupadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ },
+ {
+ "cn": [
+ "hostadmin"
+ ],
+ "description": [
+ "Host Administrators"
+ ],
+ "dn": "cn=hostadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "memberof_taskgroup": [
+ "addhosts",
+ "removehosts",
+ "modifyhosts",
+ "manage_host_keytab",
+ "enroll_host"
+ ]
+ },
+ {
+ "cn": [
+ "hostgroupadmin"
+ ],
+ "description": [
+ "Host Group Administrators"
+ ],
+ "dn": "cn=hostgroupadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ },
+ {
+ "cn": [
+ "delegationadmin"
+ ],
+ "description": [
+ "Role administration"
+ ],
+ "dn": "cn=delegationadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ },
+ {
+ "cn": [
+ "serviceadmin"
+ ],
+ "description": [
+ "Service Administrators"
+ ],
+ "dn": "cn=serviceadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "memberof_taskgroup": [
+ "addservices",
+ "removeservices",
+ "modifyservices"
+ ]
+ },
+ {
+ "cn": [
+ "automountadmin"
+ ],
+ "description": [
+ "Automount Administrators"
+ ],
+ "dn": "cn=automountadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ },
+ {
+ "cn": [
+ "netgroupadmin"
+ ],
+ "description": [
+ "Netgroups Administrators"
+ ],
+ "dn": "cn=netgroupadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ },
+ {
+ "cn": [
+ "dnsadmin"
+ ],
+ "description": [
+ "DNS Administrators"
+ ],
+ "dn": "cn=dnsadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ },
+ {
+ "cn": [
+ "dnsserver"
+ ],
+ "description": [
+ "DNS Servers"
+ ],
+ "dn": "cn=dnsserver,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ },
+ {
+ "cn": [
+ "certadmin"
+ ],
+ "description": [
+ "Certificate Administrators"
+ ],
+ "dn": "cn=certadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "memberof_taskgroup": [
+ "retrieve_certs",
+ "request_certs",
+ "request_cert_different_host",
+ "certificate_status",
+ "revoke_certificate",
+ "certificate_remove_hold"
+ ]
+ },
+ {
+ "cn": [
+ "replicaadmin"
+ ],
+ "description": [
+ "Replication Administrators"
+ ],
+ "dn": "cn=replicaadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "member_user": [
+ "admin"
+ ],
+ "memberof_taskgroup": [
+ "managereplica",
+ "deletereplica"
+ ]
+ },
+ {
+ "cn": [
+ "enrollhost"
+ ],
+ "description": [
+ "Host Enrollment"
+ ],
+ "dn": "cn=enrollhost,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "memberof_taskgroup": [
+ "manage_host_keytab",
+ "enroll_host"
+ ]
+ },
+ {
+ "cn": [
+ "entitlementadmin"
+ ],
+ "description": [
+ "Entitlement Administrators"
+ ],
+ "dn": "cn=entitlementadmin,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "memberof_taskgroup": [
+ "addentitlements",
+ "removeentitlements",
+ "modifyentitlements"
+ ]
+ }
+ ],
+ "summary": "15 rolegroups matched",
+ "truncated": false
+ }
+}
diff --git a/install/static/sampledata/rolegroup_remove_member.json b/install/static/sampledata/rolegroup_remove_member.json
new file mode 100644
index 000000000..d42bb6016
--- /dev/null
+++ b/install/static/sampledata/rolegroup_remove_member.json
@@ -0,0 +1,24 @@
+{
+ "error": null,
+ "id": 0,
+ "result": {
+ "completed": 1,
+ "failed": {
+ "member": {
+ "group": [],
+ "host": [],
+ "hostgroup": [],
+ "user": []
+ }
+ },
+ "result": {
+ "cn": [
+ "test"
+ ],
+ "description": [
+ "Test role"
+ ],
+ "dn": "cn=test,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com"
+ }
+ }
+}
diff --git a/install/static/sampledata/rolegroup_show.json b/install/static/sampledata/rolegroup_show.json
new file mode 100644
index 000000000..4652fb2cd
--- /dev/null
+++ b/install/static/sampledata/rolegroup_show.json
@@ -0,0 +1,20 @@
+{
+ "error": null,
+ "id": 0,
+ "result": {
+ "result": {
+ "cn": [
+ "test"
+ ],
+ "description": [
+ "Test role"
+ ],
+ "dn": "cn=test,cn=rolegroups,cn=accounts,dc=dev,dc=example,dc=com",
+ "member_user": [
+ "admin"
+ ]
+ },
+ "summary": null,
+ "value": "test"
+ }
+}
diff --git a/install/static/webui.js b/install/static/webui.js
index 9aaa21d6c..5e93e1816 100644
--- a/install/static/webui.js
+++ b/install/static/webui.js
@@ -29,6 +29,7 @@ var nav_tabs_lists = [
['hostgroup', 'Hostgroups', ipa_entity_setup],
['netgroup', 'Netgroups', ipa_entity_setup],
['service', 'Services', ipa_entity_setup],
+ ['rolegroup', 'Rolegroups', ipa_entity_setup],
]],
['policy', 'POLICY', unimplemented_tab],
['config', 'CONFIG', unimplemented_tab]