mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Rolegroups tab.
The Makefile.am and index.xhtml has been modified to include rolegroup.js. The webui.js has been modified to register the rolegroup tab. The rolegroup.js defines the rolegroup's search, add, and details pages. Sample data for some rolegroup operations have been added.
This commit is contained in:
@@ -28,6 +28,7 @@ app_DATA = \
|
||||
navigation.js \
|
||||
netgroup.js \
|
||||
service.js \
|
||||
rolegroup.js \
|
||||
search.js \
|
||||
details.js \
|
||||
entity.js \
|
||||
|
||||
@@ -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>
|
||||
|
||||
111
install/static/rolegroup.js
Normal file
111
install/static/rolegroup.js
Normal file
@@ -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);
|
||||
}
|
||||
22
install/static/sampledata/rolegroup_add.json
Normal file
22
install/static/sampledata/rolegroup_add.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
27
install/static/sampledata/rolegroup_add_member.json
Normal file
27
install/static/sampledata/rolegroup_add_member.json
Normal file
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
9
install/static/sampledata/rolegroup_del.json
Normal file
9
install/static/sampledata/rolegroup_del.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"error": null,
|
||||
"id": 0,
|
||||
"result": {
|
||||
"result": true,
|
||||
"summary": "Deleted rolegroup \"test\"",
|
||||
"value": "test"
|
||||
}
|
||||
}
|
||||
185
install/static/sampledata/rolegroup_find.json
Normal file
185
install/static/sampledata/rolegroup_find.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
24
install/static/sampledata/rolegroup_remove_member.json
Normal file
24
install/static/sampledata/rolegroup_remove_member.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
20
install/static/sampledata/rolegroup_show.json
Normal file
20
install/static/sampledata/rolegroup_show.json
Normal file
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user