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