Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Added missing admin forbidden error page (#12664)

Damian Legawiec0f07971709e4
diff --git a/admin/app/views/spree/admin/errors/forbidden.html.erb b/admin/app/views/spree/admin/errors/forbidden.html.erb
new file mode 100644
index 0000000000..59803b8135
--- /dev/null
+++ b/admin/app/views/spree/admin/errors/forbidden.html.erb
@@ -0,0 +1,13 @@
+<%= content_for :title do %>
+ <%= Spree.t(:forbidden) %>
+<% end %>
+
+<%= content_for :page_title do %>
+ <%= Spree.t(:forbidden) %>
+<% end %>
+
+<p class="text-danger">
+ <%= Spree.t(:forbidden_message) %>
+</p>
+
+<%= link_to Spree.t('admin.back_to_dashboard'), spree.admin_dashboard_path, class: 'btn btn-primary' %>
\ No newline at end of file
diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml
index b0df158b7a..268754ed9e 100644
--- a/core/config/locales/en.yml
+++ b/core/config/locales/en.yml
@@ -1052,6 +1052,8 @@ en:
font_size_scale: Font size scale
fonts: Fonts
footer: Footer
+ forbidden: Access denied
+ forbidden_message: You are not authorized to access this page.
forgot_password: Forgot password?
free: Free
free_shipping: Free Shipping