html << t("oauth.scopes.#{scope}")
if Oauth::MODERATOR_SCOPES.include? scope
html << " "
- html << image_tag("roles/moderator.png", :srcset => image_path("roles/moderator.svg", :class => "align-text-bottom"), :size => "20x20")
+ html << role_icon_svg_tag("moderator", false, t("oauth.for_roles.moderator"), :class => "align-text-bottom")
end
safe_join(html)
end
end
end
- def role_icon_svg_tag(role, blank, title)
+ def role_icon_svg_tag(role, blank, title, **options)
role_colors = {
"administrator" => "#f69e42",
"moderator" => "#0606ff",
color = role_colors[role] || "currentColor"
path_data = "M 10,2 8.125,8 2,8 6.96875,11.71875 5,18 10,14 15,18 13.03125,11.71875 18,8 11.875,8 10,2 z"
- tag.svg(:width => 20, :height => 20) do
+ tag.svg(:width => 20, :height => 20, **options) do
concat tag.title(title)
concat tag.path(:d => path_data, :fill => color, :stroke => color, "stroke-width" => 2, "stroke-linejoin" => "round")
concat tag.path(:d => path_data, :fill => "#fff") if blank
write_redactions: Redact map data
read_email: Read user email address
skip_authorization: Auto approve application
+ for_roles:
+ moderator: This permission is for actions available only to moderators
oauth_clients:
new:
title: "Register a new application"