This commit is contained in:
Vokhmin Alexey V 2013-07-17 15:39:58 +04:00
parent cab9ed91dd
commit 90de6e1ae7
1 changed files with 1 additions and 1 deletions

View File

@ -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