Run permission target switch action only for visible widgets

Permission details page was incorrectly evaluated as dirty (update button enabled) right after load when permission type={subtree,filter} and some attrs are set.

Can be reproduced by opening 'Modify Automount maps' permission.

The culprit is that attrs widget is populated and dirty-checked even targets where it doesn't belong.

Fixed by running target_mapping action only for visible targets.

https://fedorahosted.org/freeipa/ticket/3527
This commit is contained in:
Petr Vobornik committed 2013-04-05 10:44:44 +02:00
1 parent 4dcc947687
commit 3393c577f9
1 file changed
+1 -1
+1 -1
View File
@@ -835,7 +835,7 @@ IPA.permission_target_policy = function (widget_name) {
}
}
if (target_info.action) target_info.action();
if (visible && target_info.action) target_info.action();
};