From 194aabdbc37a7c2602a6e230a4e291754d9ef689 Mon Sep 17 00:00:00 2001 From: George Vinogradov Date: Fri, 16 Dec 2011 02:09:05 +0400 Subject: [PATCH] [issue #27] Fixed typo in ability.rb --- 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 603073798..9d5dc8706 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -48,7 +48,7 @@ class Ability # can :read, BuildList, :project => {:visibility => 'open'} do |build_list| # build_list.project.public? # end - can :read, BuildList, ["build_lists.project_id IN (SELECT id FROM projects WHERE visibility = ?", 'open'] do |build_list| + can :read, BuildList, ["build_lists.project_id IN (SELECT id FROM projects WHERE visibility = ?)", 'open'] do |build_list| build_list.project.public? end can :read, BuildList, build_lists_in_relations_with(:object_type => 'User', :object_id => user.id) do |build_list|