]> git.openstreetmap.org Git - rails.git/blob - app/helpers/authorization_helper.rb
11c8c298faa59ab958b524fa1c66c6f0ec006c93
[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 << image_tag("roles/moderator.png", :srcset => image_path("roles/moderator.svg", :class => "align-text-bottom"), :size => "20x20")
10     end
11     safe_join(html)
12   end
13 end