https://bugzilla.redhat.com/show_bug.cgi?id=798516
Apparently on f16/ruby 1.8, the conditional block with 'or' and 'not' is
not working as expected. I don't know if it's a ruby bug or something else
but it doesn't matter in this case -- using '!' and '||' is the right
way to do the conditional anyway.
---
src/app/views/permissions/_permissions.html.haml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app/views/permissions/_permissions.html.haml
b/src/app/views/permissions/_permissions.html.haml
index 6d8ab32..aadac1d 100644
--- a/src/app/views/permissions/_permissions.html.haml
+++ b/src/app/views/permissions/_permissions.html.haml
@@ -57,7 +57,7 @@
- selected = params[:select] == 'all'
= check_box_tag "permission_selected[]", permission.id, selected, :id
=> "permission_checkbox_#{permission.id}"
%td= link_to permission.entity.name, ((permission.entity.entity_target_type ==
"User") ? user_path(permission.entity.user) :
user_group_path(permission.entity.user_group))
- - if not(@show_inherited or @show_global) && has_admin_perms &&
!(prevent_admin_deletion &&
BasePermissionObject.is_global_admin_perm(permission))
+ - if !(@show_inherited || @show_global) && has_admin_perms &&
!(prevent_admin_deletion &&
BasePermissionObject.is_global_admin_perm(permission))
%td= select_tag "permission_role_selected[]",
options_for_select((a)roles.map {|r| [ t(r.name, :scope=> :role_defs, :default =>
r.name), "#{permission.id},#{r.id}" ] }, :selected =>
"#{permission.id},#{permission.role.id}", :disabled =>
@permission_object.permissions.where(["entity_id = ? and role_id != ?",
permission.entity_id, permission.role_id]).collect {|p|
"#{permission.id},#{p.role.id}"}), :id =>
"permission_role_selected_#{permission.id}"
:javascript
$("#permission_role_selected_#{permission.id}").change(function () {
$("#perm_edit_button").click(); } );
--
1.7.11.4