SUDO adjustments

The SUDO rule details facet has been updated to support the latest UI
spec. The facet consists of 5 sections: general, users, hosts, commands,
and run-as.

The general section contains the SUDO rule description and status. If
the status is changed, the sudorule-enable/disable will be invoked.

The other sections contain radio buttons for the association category
and tables for the members. When a member is added or removed, the
category will be adjusted appropriately. If the category is changed to
'all', 'allow', or 'deny', all members will be removed.

The last section is currently not working because backend support is
not yet available.

The adder dialog boxes for users, groups, and hosts has been modified
to accept external identities. The layout for the base adder dialog
was updated. The base dialog class was updated to support templates.
The SUDO dialog boxes were implemented using templates. New CSS
classes were added to ipa.css.

The HBAC rule details facet has been updated as well.
This commit is contained in:
Endi S. Dewata
2010-12-07 01:51:51 -06:00
committed by Adam Young
parent 5b7abefb42
commit db822955c2
14 changed files with 1588 additions and 268 deletions

View File

@@ -169,6 +169,9 @@ function ipa_association_adder_dialog(spec) {
ipa_cmd('find', [that.get_filter()], {'all': true}, on_success, null, that.other_entity);
};
that.association_adder_dialog_init = that.init;
that.association_adder_dialog_setup = that.setup;
return that;
}
@@ -386,24 +389,28 @@ function ipa_association_table_widget(spec) {
}
};
that.show_add_dialog = function() {
that.create_add_dialog = function() {
var pkey = $.bbq.getState(that.entity_name + '-pkey', true) || '';
var label = IPA.metadata[that.other_entity].label;
var title = 'Add '+label+' to '+that.entity_name+' '+pkey;
var dialog = ipa_association_adder_dialog({
return ipa_association_adder_dialog({
'title': title,
'entity_name': that.entity_name,
'pkey': pkey,
'other_entity': that.other_entity
});
};
that.show_add_dialog = function() {
var dialog = that.create_add_dialog();
if (that.adder_columns.length) {
dialog.set_columns(that.adder_columns);
}
dialog.add = function() {
dialog.execute = function() {
that.add(
dialog.get_selected_values(),
function() {
@@ -493,10 +500,6 @@ function ipa_association_table_widget(spec) {
command.execute();
};
that.save = function() {
return null;
};
// methods that should be invoked by subclasses
that.association_table_widget_init = that.init;
@@ -707,7 +710,7 @@ function ipa_association_facet(spec) {
dialog.set_columns(that.adder_columns);
}
dialog.add = function() {
dialog.execute = function() {
var pkey = $.bbq.getState(that.entity_name + '-pkey', true) || '';