Allow all users use search method for advisories

This commit is contained in:
Vladmir Sharhsov(warpc) 2013-05-21 20:55:29 +04:00
parent 0da9bfef74
commit 37f6390910
2 changed files with 12 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class Ability
can :search, BuildList
can [:read, :log, :everything], BuildList, :project => {:visibility => 'open'}
can [:read, :log], ProductBuildList#, :product => {:platform => {:visibility => 'open'}} # double nested hash don't work
can :read, Advisory
can [:read, :search], Advisory
# Platforms block
can [:show, :members, :advisories], Platform, :visibility => 'open'

View File

@ -0,0 +1,11 @@
# -*- encoding : utf-8 -*-
require 'spec_helper'
describe AdvisoriesController do
context 'for all' do
it "should be able to perform search action" do
get :search
response.should_not redirect_to(forbidden_path)
end
end
end