views:

84

answers:

4

Hey, i need some help with rails, again! Last it was about Authlogic.. Well I'm gone a bit backward since.. I mean, Authlogic isn't a Authentcate system i like.. So now i wan't you guys to tell me what you think is the best!

I going to use it to a project of mine. Where there has to be a few roles like Admin, User and Guest.. So might you guys can tell me what is good and what is bad..?

A: 

I used Devise and it worked quite well, however it did not met my needs... What you might need however looks like something super simple, something like this: http://railscasts.com/episodes/21-super-simple-authentication

Gabriel Ščerbák
What didn't work for you with devise?
jpartogi
@jpartogi I wanted to embed the login form as a partial and I could not do it. Also I would prefere having controllers generated in my source, so I could edit some details if I needed.
Gabriel Ščerbák
+1  A: 

You need to split authentication from authorization.

Authentication covers the login/logout process authorization is directly linked to permission to see/use resources.

Authlogic is a very good authentication gem.

For authorization you can check CanCan from Ryan Bates

Which is very simple to integrate with authlogic (just a single file in the models folder called ability.rb in which you configure all the app authorizations).

EDIT: You can also go with a simpler solution but you will loose in flexibility

tommasop
A: 

I use Authlogic for authentication and DocSavage's Rails Authorisation plug-in for authorisation needs. Its a simple yet powerful plug-in.

Rails authorisation plug-in: http://github.com/DocSavage/rails-authorization-plugin

sam
+1  A: 

In all honesty you can writ your own authorization with a few before_filters. AuthLogic or any decent Auth plugin will work fine with this.

thomasfedb