Created
July 6, 2010 03:28
-
-
Save davidray/464962 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Trisano | |
module Locales | |
module Controllers | |
module AdminController | |
hook! "AdminController" | |
reloadable! | |
class << self | |
def included(base) | |
base.before_filter :manage_passwords_links | |
base.helper_method :trisano_auth_scope | |
end | |
end | |
protected | |
def manage_passwords_links | |
system_configuration_links << { | |
:description => I18n.t('manage_passwords_link', :scope => trisano_auth_scope), | |
:link => password_resets_path | |
} if User.current_user.is_admin? | |
end | |
private | |
def trisano_auth_scope | |
[:trisano_auth] | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment