]> git.openstreetmap.org Git - rails.git/blob - app/helpers/authorization_helper.rb
Merge remote-tracking branch 'upstream/pull/6305'
[rails.git] / app / helpers / authorization_helper.rb
1 module AuthorizationHelper
2   include ActionView::Helpers::TranslationHelper
3
4   def authorization_scope(scope)
5     html = []
6     html << t("oauth.scopes.#{scope}")
7     if Oauth::MODERATOR_SCOPES.include? scope
8       html << " "
9       html << inline_svg_tag("icons/role-star.svg", :class => "role-icon moderator align-text-bottom",
10                                                     :title => t("oauth.for_roles.moderator"))
11     end
12     safe_join(html)
13   end
14 end