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 2013-03-21 15:47:50 +01:00
parent 4dcc947687
commit 3393c577f9

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();
}; };