diff --git a/Configuration.md b/Configuration.md index 49520c4a3fe..e85b2eeabd1 100644 --- a/Configuration.md +++ b/Configuration.md @@ -72,6 +72,7 @@ _All_ of the following environments need to be set (except SMTP authentication i | PWP__HOST_DOMAIN | Used to build fully qualified URLs in emails. Where is your instance hosted? | `pwpush.com` | | PWP__HOST_PROTOCOL | The protocol to access your Password Pusher instance. HTTPS advised. | `https` | | PWP__MAIL__MAILER_SENDER | This is the "From" address in sent emails. | '"Company Name" ' | +| PWP__DISABLE_SIGNUPS| Once your user accounts are created, you can set this disable any further user account creation. Sign up links and related backend functionality is disabled when `true`. | `false` | ## Shell Example diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index 158338f3496..892228082b0 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -6,7 +6,7 @@ <%= link_to I18n.t('devise.general.login'), new_session_path(resource_name), class: 'nav-link px-2 text-muted' %> <% end %> - <%- if devise_mapping.registerable? && controller_name != 'registrations' %> + <%- if devise_mapping.registerable? && controller_name != 'registrations' && !Settings.disable_signups %>
  • <%= link_to I18n.t('devise.general.sign_up'), new_registration_path(resource_name), class: 'nav-link px-2 text-muted' %>
  • diff --git a/app/views/shared/_header.html.erb b/app/views/shared/_header.html.erb index ed9887ad7e8..28e42047a10 100644 --- a/app/views/shared/_header.html.erb +++ b/app/views/shared/_header.html.erb @@ -56,9 +56,11 @@ - + <% if !Settings.disable_signups %> + + <% end %> <% end %> <% end %>