Reputation: 1157
How can I stop just anyone signing up to my application rails admin using devise?
Currently when someone goes to my domain /admin they get the opportunity to sign up.
I have all the users i need and i don't want Joe Public to be able to gain access to the backend.
it may be as simple as to change the routes?
Upvotes: 2
Views: 242
Reputation: 25994
Remove the :registerable
flag from the User
class. (Assuming the User
class is you Devise class, of course.)
Upvotes: 6
Reputation: 18193
Take a look at your devise model, and you should see something like this:
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
end
The devise
line is setting up which devise functionality will be included in your application. Remove the :registerable
symbol and signup will no longer be an option.
Upvotes: 2