Skip to content

Commit

Permalink
Disable new user registration due to abuse
Browse files Browse the repository at this point in the history
  • Loading branch information
kadams54 committed Aug 21, 2024
1 parent b3b8f24 commit c930396
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def new
def create
@user = User.new(user_params)
if @user.save
@user.send_activation_email
#@user.send_activation_email
flash[:info] = "Please check your email to activate your account."
redirect_to root_url
else
Expand Down
3 changes: 3 additions & 0 deletions app/views/users/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

<div class="column col-6 col-md-10 col-sm-12 col-mx-auto">
<h1>Sign Up</h1>
<p>New user registration is temporarily disabled.</p>
<!--
<%= render 'form' %>
-->
</div>
2 changes: 2 additions & 0 deletions test/integration/users_signup_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def setup
end

test "invalid signup information" do
skip "User registrations turned off"
get signup_path
assert_select 'form[action="/signup"]'
assert_no_difference "User.count" do
Expand All @@ -17,6 +18,7 @@ def setup
end

test "valid signup information with account activation" do
skip "User registrations turned off"
get signup_path
assert_select 'form[action="/signup"]'
assert_difference "User.count", 1 do
Expand Down

0 comments on commit c930396

Please sign in to comment.