diff --git a/app/models/environment.rb b/app/models/environment.rb index 8e237ef..0d0f345 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -89,7 +89,7 @@ class Environment < ActiveRecord::Base 'disable_select_city_for_contact' => _('Disable state/city select for contact form'), 'disable_contact_person' => _('Disable contact for people'), 'disable_contact_community' => _('Disable contact for groups/communities'), - 'disable_enterprise_registration' => _('Disable the enterprise registration'), + 'enterprise_registration' => _('Enterprise registration'), 'join_community_popup' => _('Ask users to join a group/community with a popup'), 'enterprise_activation' => _('Enable activation of enterprises'), diff --git a/app/views/memberships/index.rhtml b/app/views/memberships/index.rhtml index cc3e85f..8247608 100644 --- a/app/views/memberships/index.rhtml +++ b/app/views/memberships/index.rhtml @@ -4,7 +4,7 @@ <% button_bar do %> <%= button(:add, __('Create a new community'), :controller => 'memberships', :action => 'new_community') %> - <%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if !environment.enabled?('disable_enterprise_registration') %> + <%= button :add, __('Register a new enterprise'), :controller => 'enterprise_registration' if environment.enabled?('enterprise_registration') %> <%= button :back, _('Go back'), :controller => 'profile_editor' %> <% end %> diff --git a/app/views/profile/enterprises.rhtml b/app/views/profile/enterprises.rhtml index f358975..5052542 100644 --- a/app/views/profile/enterprises.rhtml +++ b/app/views/profile/enterprises.rhtml @@ -12,7 +12,7 @@ <% button_bar do %> <%= button :back, _('Go back'), { :controller => 'profile' }, :help => _('Back to the page where you come from.') %> - <%= button :add, __('Register a new Enterprise'), :controller => 'enterprise_registration' if logged_in? && !environment.enabled?('disable_enterprise_registration') %> + <%= button :add, __('Register a new Enterprise'), :controller => 'enterprise_registration' if logged_in? && environment.enabled?('enterprise_registration') %> <% end %> diff --git a/features/register_enterprise.feature b/features/register_enterprise.feature index b313096..1ef9cf0 100644 --- a/features/register_enterprise.feature +++ b/features/register_enterprise.feature @@ -10,9 +10,10 @@ Feature: register enterprise And I am logged in as "joaosilva" And I am on Joao Silva's control panel + And feature "enterprise_registration" is enabled on environment Scenario: enterprise registration is disabled by admin - Given feature "disable_enterprise_registration" is enabled on environment + Given feature "enterprise_registration" is disabled on environment When I follow "Manage my groups" Then I should not see "Register a new enterprise" -- libgit2 0.21.2