fix tests for site controller
This commit is contained in:
parent
2ab3d56102
commit
b16aa11f65
2 changed files with 5 additions and 2 deletions
|
@ -103,7 +103,9 @@ class SiteController < ApplicationController
|
||||||
@locale = params[:copyright_locale] || I18n.locale
|
@locale = params[:copyright_locale] || I18n.locale
|
||||||
end
|
end
|
||||||
|
|
||||||
def welcome; end
|
def welcome
|
||||||
|
require_user
|
||||||
|
end
|
||||||
|
|
||||||
def help; end
|
def help; end
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,10 @@ class Ability
|
||||||
|
|
||||||
def initialize(user)
|
def initialize(user)
|
||||||
can :index, :site
|
can :index, :site
|
||||||
|
can [:permalink, :edit, :help, :fixthemap, :offline, :export, :about, :preview, :copyright, :key, :id, :welcome], :site
|
||||||
|
|
||||||
if user
|
if user
|
||||||
can :welcome, :site
|
can :weclome, :site
|
||||||
end
|
end
|
||||||
# Define abilities for the passed in user here. For example:
|
# Define abilities for the passed in user here. For example:
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue