From 90de6e1ae721899758d70733e80505768f626f09 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Wed, 17 Jul 2013 15:39:58 +0400 Subject: [PATCH] #219: hot fix --- app/models/ability.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index 3662bd695..0cd9da71c 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -204,7 +204,7 @@ class Ability INNER JOIN #{parent} ON relations.target_type = :target_type AND relations.target_id = #{parent}.id WHERE relations.target_type = :target_type AND ( - #{parent}.owner_type = 'User' AND #{parent}.owner_id != 1 OR + #{parent}.owner_type = 'User' AND #{parent}.owner_id != :user OR #{parent}.owner_type = 'Group' AND #{parent}.owner_id NOT IN (:groups) ) AND ( relations.actor_type = 'User' AND relations.actor_id = :user OR