def check_permission
unless current_user.administrator? || current_user.moderator?
- flash[:error] = t("application.require_admin.not_an_admin")
+ flash[:error] = t("application.require_moderator_or_admin.not_a_moderator_or_admin")
redirect_to root_path
end
end
def check_permission
unless current_user.administrator? || current_user.moderator?
- flash[:error] = t("application.require_admin.not_an_admin")
+ flash[:error] = t("application.require_moderator_or_admin.not_a_moderator_or_admin")
redirect_to root_path
end
end
not_an_admin: You need to be an admin to perform that action.
require_moderator:
not_a_moderator: "You need to be a moderator to perform that action."
+ require_moderator_or_admin:
+ not_a_moderator_or_admin: You need to be a moderator or an admin to perform that action
setup_user_auth:
blocked_zero_hour: "You have an urgent message on the OpenStreetMap web site. You need to read the message before you will be able to save your edits."
blocked: "Your access to the API has been blocked. Please log-in to the web interface to find out more."
sign_in_as(create(:user))
visit issues_path
- assert page.has_content?(I18n.t("application.require_admin.not_an_admin"))
+ assert page.has_content?(I18n.t("application.require_moderator_or_admin.not_a_moderator_or_admin"))
end
def test_view_no_issues