mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
policy and config
Population of the policy and entites tabs. DNS and ACI are broken due to PLugin issues Fix for entities without search Added new files to Makefile.am used rolegroup.js file as the start point, renamed to serverconfig.js
This commit is contained in:
parent
016f889a51
commit
9cb3a07aca
@ -28,7 +28,8 @@ app_DATA = \
|
||||
navigation.js \
|
||||
netgroup.js \
|
||||
service.js \
|
||||
rolegroup.js \
|
||||
serverconfig.js \
|
||||
policy.js \
|
||||
search.js \
|
||||
details.js \
|
||||
entity.js \
|
||||
|
@ -125,14 +125,14 @@ function ipa_details_load(jobj, pkey, on_win, on_fail)
|
||||
details.append('<p>'+error_thrown.message+'</p>');
|
||||
};
|
||||
|
||||
if (!pkey)
|
||||
return;
|
||||
|
||||
var params = [pkey];
|
||||
if (!pkey){
|
||||
params = [];
|
||||
}
|
||||
ipa_cmd(
|
||||
'show', [pkey], {all: true}, load_on_win, load_on_fail, obj_name
|
||||
'show', params, {all: true}, load_on_win, load_on_fail, obj_name
|
||||
);
|
||||
}
|
||||
|
||||
function ipa_details_update(obj_name, pkey, on_win, on_fail)
|
||||
{
|
||||
function update_on_win(data, text_status, xhr) {
|
||||
|
@ -49,16 +49,21 @@ function ipa_entity_set_association_definition(obj_name, data)
|
||||
ipa_entity_association_list[obj_name] = data;
|
||||
}
|
||||
|
||||
function ipa_entity_setup(container)
|
||||
|
||||
function ipa_details_only_setup(container){
|
||||
ipa_entity_setup(container, 'details');
|
||||
}
|
||||
|
||||
function ipa_entity_setup(container, unspecified)
|
||||
{
|
||||
var id = container.attr('id');
|
||||
|
||||
var state = id + '-facet';
|
||||
var facet = $.bbq.getState(state, true) || 'search';
|
||||
var facet = $.bbq.getState(state, true) || unspecified || 'search';
|
||||
var last_facet = window_hash_cache[state];
|
||||
|
||||
if (facet != last_facet) {
|
||||
_ipa_entity_setup(container);
|
||||
_ipa_entity_setup(container,unspecified);
|
||||
window_hash_cache[state] = facet;
|
||||
|
||||
} else if (facet == 'search') {
|
||||
@ -90,7 +95,7 @@ function ipa_entity_setup(container)
|
||||
}
|
||||
}
|
||||
|
||||
function _ipa_entity_setup(jobj) {
|
||||
function _ipa_entity_setup(jobj,unspecified) {
|
||||
|
||||
var obj_name = jobj.attr('id');
|
||||
|
||||
@ -137,15 +142,16 @@ function _ipa_entity_setup(jobj) {
|
||||
search_load(jobj, filter, null, null);
|
||||
};
|
||||
|
||||
function setup_details_facet() {
|
||||
function setup_details_facet(unspecified) {
|
||||
var pkey = $.bbq.getState(obj_name + '-pkey', true);
|
||||
ipa_entity_generate_views(obj_name, jobj, switch_view);
|
||||
ipa_details_create(obj_name, ipa_entity_details_list[obj_name], jobj);
|
||||
jobj.find('.details-reset').click(reset_on_click);
|
||||
jobj.find('.details-update').click(update_on_click);
|
||||
|
||||
if (pkey)
|
||||
if (pkey||unspecified){
|
||||
ipa_details_load(jobj, pkey, null, null);
|
||||
}
|
||||
};
|
||||
|
||||
function setup_associate_facet() {
|
||||
@ -175,11 +181,12 @@ function _ipa_entity_setup(jobj) {
|
||||
|
||||
jobj.empty();
|
||||
|
||||
var facet = $.bbq.getState(obj_name + '-facet', true) || 'search';
|
||||
var facet = $.bbq.getState(obj_name + '-facet', true) ||
|
||||
unspecified || 'search';
|
||||
if (facet == 'search') {
|
||||
setup_search_facet();
|
||||
} else if (facet == 'details') {
|
||||
setup_details_facet();
|
||||
setup_details_facet(unspecified);
|
||||
} else if (facet == 'associate') {
|
||||
setup_associate_facet();
|
||||
}
|
||||
|
@ -25,7 +25,9 @@
|
||||
<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="serverconfig.js"></script>
|
||||
<script type="text/javascript" src="policy.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="develop.js"></script>
|
||||
<script type="text/javascript" src="webui.js"></script>
|
||||
@ -37,7 +39,7 @@
|
||||
<body>
|
||||
<div class="header" >
|
||||
<span class="header-logo">
|
||||
<img src="ipalogo.png" />
|
||||
<a href="#"><img src="ipalogo.png" /></a>
|
||||
</span>
|
||||
<span id="loggedinas" class="header-loggedinas">
|
||||
<a href="#"><span id="login_header">Logged in as</span>: <strong>user@FREEIP.ORG</strong></a>
|
||||
|
151
install/static/policy.js
Normal file
151
install/static/policy.js
Normal file
@ -0,0 +1,151 @@
|
||||
/* Authors:
|
||||
* Adam Young <ayoung@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('hbac', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'description', null],
|
||||
['quick_links', 'Quick Links', ipa_entity_quick_links]
|
||||
]);
|
||||
|
||||
ipa_entity_set_add_definition('hbac', [
|
||||
'dialog-add-hbac', 'Add New Zone', [
|
||||
['cn', 'Name', null],
|
||||
]
|
||||
]);
|
||||
|
||||
ipa_entity_set_details_definition('hbac', [
|
||||
['identity', 'HBAC Details', [
|
||||
['cn', 'HBAC Name'],
|
||||
["accessruletype", "Rule Type"],
|
||||
[ "description", "Description"],
|
||||
["hostcategory", "Host Category"],
|
||||
["ipaenabledflag", "Enabled"],
|
||||
["servicecategory", "Service Category"],
|
||||
["sourcehostcategory", "Source Host Category"],
|
||||
["usercategory", "User Category"]
|
||||
]]
|
||||
]);
|
||||
|
||||
ipa_entity_set_association_definition('hbac', {
|
||||
});
|
||||
|
||||
/* DNS */
|
||||
ipa_entity_set_search_definition('dns', [
|
||||
['idnsname', 'Zone Name', null],
|
||||
['quick_links', 'Quick Links', ipa_entity_quick_links]
|
||||
]);
|
||||
|
||||
ipa_entity_set_add_definition('dns', [
|
||||
'dialog-add-dns', 'Add New Zone', [
|
||||
['idnsname', 'Name', null],
|
||||
['idnssoamname', 'Authoritative name server'],
|
||||
['idnssoarname','administrator e-mail address'],
|
||||
]
|
||||
]);
|
||||
|
||||
ipa_entity_set_details_definition('dns', [
|
||||
['identity', 'DNS Zone Details', [
|
||||
['idnsname', 'DNS Name'],
|
||||
['idnszoneactive', 'Zone Active'],
|
||||
['idnssoamname', 'Authoritative name server'],
|
||||
['idnssoarname','administrator e-mail address'],
|
||||
['idnssoaserial', 'SOA serial'],
|
||||
['idnssoarefresh', 'SOA refresh'],
|
||||
['idnssoaretry', 'SOA retry'],
|
||||
['idnssoaexpire','SOA expire'],
|
||||
['idnssoaminimum', 'SOA minimum'],
|
||||
['dnsttl','SOA time to live'],
|
||||
['dnsclass','SOA class'],
|
||||
['idnsallowdynupdate','allow dynamic update?'],
|
||||
['idnsupdatepolicy', 'BIND update policy'],
|
||||
]]
|
||||
]);
|
||||
|
||||
ipa_entity_set_association_definition('dns', {
|
||||
});
|
||||
|
||||
|
||||
/**Automount*/
|
||||
|
||||
ipa_entity_set_search_definition('automountlocation', [
|
||||
['cn', 'Name', null],
|
||||
['quick_links', 'Quick Links', ipa_entity_quick_links]
|
||||
|
||||
]);
|
||||
|
||||
ipa_entity_set_add_definition('automountlocation', [
|
||||
'dialog-add-location', 'Add New Location', [
|
||||
['cn', 'Name', null],
|
||||
]
|
||||
]);
|
||||
|
||||
ipa_entity_set_details_definition('automountlocation', [
|
||||
['identity', 'Automount Location Details', [
|
||||
['cn', 'Automount Location'],]
|
||||
]]);
|
||||
|
||||
ipa_entity_set_association_definition('automountlocation', {
|
||||
});
|
||||
|
||||
|
||||
/**pwpolicy*/
|
||||
|
||||
ipa_entity_set_search_definition('pwpolicy', [
|
||||
['cn', 'Name', null],
|
||||
['quick_links', 'Quick Links', ipa_entity_quick_links]
|
||||
|
||||
]);
|
||||
|
||||
ipa_entity_set_add_definition('pwpolicy', [
|
||||
'dialog-add-dns', 'Add New Location', [
|
||||
['cn', 'Name', null],
|
||||
]
|
||||
]);
|
||||
|
||||
ipa_entity_set_details_definition('pwpolicy', [
|
||||
['identity', 'Password Policy', [
|
||||
["krbmaxpwdlife","Max Password Life"],
|
||||
["krbminpwdlife","Min Password Life"],
|
||||
["krbpwdhistorylength","Password History Length"],
|
||||
["krbpwdmindiffchars", "Min Different Characters"],
|
||||
["krbpwdminlength", "Password Minimum Length"]
|
||||
]]
|
||||
]);
|
||||
|
||||
ipa_entity_set_association_definition('pwpolicy', {
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
krbtpolicy
|
||||
Does not have search
|
||||
*/
|
||||
|
||||
ipa_entity_set_details_definition('krbtpolicy', [
|
||||
['identity', 'Krbtpolicy Location Details', [
|
||||
['cn', 'Krbtpolicy Location'],
|
||||
["krbmaxrenewableage", "Max Renewable Age"],
|
||||
["krbmaxticketlife", "Max Ticket Life"]
|
||||
]]]);
|
||||
|
||||
ipa_entity_set_association_definition('krbtpolicy', {
|
||||
});
|
@ -1,45 +0,0 @@
|
||||
/* 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', ipa_entity_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],
|
||||
]]
|
||||
]);
|
||||
|
||||
ipa_entity_set_association_definition('rolegroup', {
|
||||
'taskgroup': { associator: SerialAssociator }
|
||||
});
|
118
install/static/serverconfig.js
Normal file
118
install/static/serverconfig.js
Normal file
@ -0,0 +1,118 @@
|
||||
/* Authors:
|
||||
* Endi Sukma Dewata <edewata@redhat.com>
|
||||
* Adam Young <ayoung@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 */
|
||||
|
||||
|
||||
|
||||
/* ACI */
|
||||
ipa_entity_set_search_definition('aci', [
|
||||
['cn', 'ACI name', null],
|
||||
['quick_links', 'Quick Links', ipa_entity_quick_links]
|
||||
]);
|
||||
|
||||
ipa_entity_set_add_definition('aci', [
|
||||
'dialog-add-aci', 'Add New Aci', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'Description', null],
|
||||
]
|
||||
]);
|
||||
|
||||
ipa_entity_set_details_definition('aci', [
|
||||
['ipaserver', 'Aci Details', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'Description', null],
|
||||
]]
|
||||
]);
|
||||
|
||||
|
||||
/* Taskgroup*/
|
||||
|
||||
ipa_entity_set_search_definition('taskgroup', [
|
||||
['cn', 'Role-group name', null],
|
||||
['description', 'Description', null],
|
||||
['quick_links', 'Quick Links', ipa_entity_quick_links]
|
||||
]);
|
||||
|
||||
ipa_entity_set_add_definition('taskgroup', [
|
||||
'dialog-add-taskgroup', 'Add New Taskgroup', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'Description', null],
|
||||
]
|
||||
]);
|
||||
|
||||
ipa_entity_set_details_definition('taskgroup', [
|
||||
['ipaserver', 'Taskgroup Details', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'Description', null],
|
||||
]]
|
||||
]);
|
||||
|
||||
ipa_entity_set_association_definition('rolegroup', {
|
||||
'rolegroup': { associator: BulkAssociator }
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
/* Rolegroup*/
|
||||
|
||||
ipa_entity_set_search_definition('rolegroup', [
|
||||
['cn', 'Role-group name', null],
|
||||
['description', 'Description', null],
|
||||
['quick_links', 'Quick Links', ipa_entity_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', [
|
||||
['ipaserver', 'Rolegroup Details', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'Description', null],
|
||||
]]
|
||||
]);
|
||||
|
||||
ipa_entity_set_association_definition('rolegroup', {
|
||||
'taskgroup': { associator: SerialAssociator }
|
||||
});
|
||||
|
||||
/* Configuration */
|
||||
ipa_entity_set_details_definition('config',[
|
||||
['ipaserver', 'Configuration', [
|
||||
['cn', 'Name', null],
|
||||
['description', 'Description', null],
|
||||
['ipacertificatesubjectbase', 'Certificat Subject Base',null],
|
||||
[ 'ipadefaultloginshell', 'Default Login Shell',null],
|
||||
['ipadefaultprimarygroup', 'Default Primary Group',null],
|
||||
['ipagroupsearchfields', 'Group Search Fields',null],
|
||||
['ipahomesrootdir', 'Home Root Dir',null],
|
||||
['ipamaxusernamelength', 'Max Username Length',null],
|
||||
['ipamigrationenabled', 'Migration enabled?',null],
|
||||
['ipasearchrecordslimit', 'Search Record Limit',null],
|
||||
['ipasearchtimelimit', 'Search Time Limit',null],
|
||||
['ipausersearchfields', 'User Search Fields',null]
|
||||
]]
|
||||
]);
|
@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
var admin_tab_set = [
|
||||
{name:'identity', label:'IDENTITY', children:[
|
||||
{name:'identity', children:[
|
||||
{name:'user', label:'Users', setup: ipa_entity_setup},
|
||||
{name:'group', label:'Groups', setup: ipa_entity_setup},
|
||||
{name:'host', label:'Hosts', setup: ipa_entity_setup},
|
||||
@ -32,9 +32,18 @@ var admin_tab_set = [
|
||||
{name:'netgroup', label:'Netgroups', setup: ipa_entity_setup},
|
||||
{name:'service', label:'Services', setup: ipa_entity_setup}
|
||||
]},
|
||||
{name:'policy', label:'POLICY', setup: unimplemented_tab},
|
||||
{name:'config', label:'CONFIG', children: [
|
||||
{name:'rolegroup', label:'Rolegroups', setup: ipa_entity_setup}
|
||||
{name:'policy', children:[
|
||||
{name:'hbac', setup: ipa_entity_setup},
|
||||
{name:'dns', setup: ipa_entity_setup},
|
||||
{name:'automountlocation', setup: ipa_entity_setup},
|
||||
{name:'pwpolicy', setup: ipa_entity_setup},
|
||||
{name:'krbtpolicy', setup:ipa_details_only_setup}
|
||||
]},
|
||||
{name:'ipaserver', children: [
|
||||
// {name:'aci', setup: ipa_entity_setup},
|
||||
{name:'taskgroup', setup: ipa_entity_setup},
|
||||
{name:'rolegroup', label:'Rolegroups', setup: ipa_entity_setup},
|
||||
{name:'config', setup: ipa_details_only_setup}
|
||||
]}
|
||||
];
|
||||
|
||||
|
@ -100,6 +100,8 @@ class automountlocation(LDAPObject):
|
||||
object_name_plural = 'automount locations'
|
||||
object_class = ['nscontainer']
|
||||
default_attributes = ['cn']
|
||||
label = _('Automount')
|
||||
|
||||
|
||||
takes_params = (
|
||||
Str('cn',
|
||||
|
@ -56,6 +56,8 @@ class krbtpolicy(LDAPObject):
|
||||
object_name = 'kerberos ticket policy settings'
|
||||
default_attributes = ['krbmaxticketlife', 'krbmaxrenewableage']
|
||||
|
||||
label=_('Kerberos Ticket Policy')
|
||||
|
||||
takes_params = (
|
||||
Str('uid?',
|
||||
cli_name='user',
|
||||
|
@ -167,6 +167,8 @@ class pwpolicy(LDAPObject):
|
||||
'krbpwdhistorylength', 'krbpwdmindiffchars', 'krbpwdminlength',
|
||||
]
|
||||
|
||||
label = _('Password Policy')
|
||||
|
||||
takes_params = (
|
||||
Str('cn?',
|
||||
cli_name='group',
|
||||
|
Loading…
Reference in New Issue
Block a user