Skip to content

Commit

Permalink
Fix access denied notice.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Dec 1, 2011
1 parent 82a9b95 commit ab52e69
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ def render_optional_error_file(status_code)
end

rescue_from CanCan::AccessDenied do |exception|
flash[:error] = "你可能沒有權限 / 需要登入"
redirect_to root_url
redirect_to topics_path, :alert => t("common.access_denied")
end


Expand Down
1 change: 1 addition & 0 deletions config/locales/menu.zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
statics: "统计信息"
comments: "条评论"
no_search_result: "没有搜索到相关内容。"
access_denied: "访问被拒绝,你可能没有权限或未登陆。"
posts:
recent_publish_post: "最近发布的文章"
post_source: "文章來源"
Expand Down
3 changes: 2 additions & 1 deletion config/locales/menu.zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
highlight_topic: "置頂話題"
statics: "統計資訊"
comments: "条评论"
no_search_result: "没有搜索到相关内容。"
no_search_result: "沒有查詢到相關內容。"
access_denied: "訪問被拒絕,你可能沒有權限或未登陸。"
posts:
recent_publish_post: "最近發布的文章"
post_source: "文章来源"
Expand Down

0 comments on commit ab52e69

Please sign in to comment.