How to Implement ACL (Access Control List) in ROR?


#1

Hey All, Could any body tell me about implementation of ACL in RoR,
becasue
i was searching on it for last two days but I haven’t got anything very
helpful. I have downloaded the restful_authentication plugin for it, but
I
dont have any tutorial about using this plugin. Or tell me if there is
any
other plugin for this.
Thanks & Regards,
Shahroon


#2

Hi Shahroon,

what you could do is to register at http://www.buildingwebapps.com/ and
take
the Learning Rails free online-course. That’s what I did. In one of the
screencasts they explain how to do Login and all that stuff. It’s pretty
easy.

Good luck and hopefully I could help.

Chris


#3

shahroon ali wrote:

Hey All, Could any body tell me about implementation of ACL in RoR,
becasue
i was searching on it for last two days but I haven’t got anything very
helpful. I have downloaded the restful_authentication plugin for it, but
I
dont have any tutorial about using this plugin. Or tell me if there is
any
other plugin for this.
Thanks & Regards,
Shahroon

First of all restful_authentication does not implement ACL. It is a
authentication plugin not an authorization plugin.

I have not investigated any of these but a quick search for ACL on
Github list a good number of solutions:

http://github.com/search?q=acl&x=0&y=0


#4

An idea came to my mind right now. You could either create your own
plugin which implements ACL, groups etc. I’m sure somebody will need
it one day :wink: That’s how things come to being.
The other thing is that when an user is created he or the admin can
set an attribut in which group he/she belongs like in *nix system. Or
you can use a default setting etc.

Example
Normally you would have a user model with the following attributes

User:

  • name
  • password

Than you create a group model and assosiate a user to a group or to
several groups.
You could also mark/flag some resources with an group id/attribute, so
that an user can access that resource only iff he is a member of that
certain group. Just like *nix platforms.

Hope, I could help. Btw I’m a Rails newby, but that was an idea that
came to my mind. Maybe a rails veteran can add some comment.

Greetings

Chris


#5

Thanks both of you, well i have implemented the user authentication and
I
know how to do that but I am searching a solution for a Group Based ACL,
I
just want to know that if there is any plugin available for this or not?
And
I have visited the github site as well but its examples or can say
solutions
are mostly in old versions of rails.
Thanks & Regards,
Shahroon

On Wed, Jan 7, 2009 at 11:01 AM, Robert W. <