New User Sign Up/Registration

45 views
Skip to first unread message

Dan

unread,
May 29, 2012, 1:36:21 PM5/29/12
to Devise
Hi,

I've customized devise so that sign-up/registration is restricted to
"admin" users. However, whenever I register a new user, upon
successful registration I am logged in as the newly created user. Does
anyone know how to change this behavior so that upon successful
registration I maintain my original login user? Thanks.

-Dan

Carlos Antonio da Silva

unread,
May 29, 2012, 2:05:11 PM5/29/12
to plataforma...@googlegroups.com
Devise registration module is not supposed to be used as admin registration for users.

In any case, you'd have to copy over registrations#create action and remove the sign_in call that is probably existent there, which means you do need a custom controller for that.

-- 
At.
Carlos Antonio

Dan

unread,
Jun 4, 2012, 12:53:02 PM6/4/12
to Devise
> Devise registration module is not supposed to be used as admin registration for users.

How else can I restrict registration rights to admins? Is there a
admin module?

> In any case, you'd have to copy over registrations#create action and remove the sign_in call that is probably existent there, which means you do need a custom controller for that.

Thanks for the help.

-Dan

Carlos Antonio da Silva

unread,
Jun 4, 2012, 10:33:54 PM6/4/12
to plataforma...@googlegroups.com
The best way to allow an "admin" to manage users, is to create your own users controller and restrict access to it. This way Devise won't bother you in any way.

-- 
At.
Carlos Antonio

Reply all
Reply to author
Forward
0 new messages