Fixed: permission attrs table didn't update its available options on load

It could lead to state where attributes from other object type were displayed instead of the correct ones.

https://fedorahosted.org/freeipa/ticket/2590
This commit is contained in:
Petr Vobornik 2012-04-02 15:00:26 +02:00
parent 26abd05d5e
commit 31f1562419

View File

@ -759,6 +759,13 @@ IPA.permission_target_policy = function (widget_name) {
attribute_field.reset();
};
that.update_attrs = function() {
var type_select = that.permission_target.widgets.get_widget('type');
var type = type_select.save()[0];
that.set_attrs_type(type);
};
that.post_create = function() {
that.select_target(that.permission_target.targets[0]);
};
@ -853,7 +860,10 @@ IPA.permission_target_policy = function (widget_name) {
{
name: 'attrs'
}
]
],
action: function() {
that.update_attrs();
}
}
};