Hello,
I''m currently working on a text-based roleplay browser game, and
i''m trying
to figure out what the best approach would be in order to create a system
that allows me to assign roles to a user, and permissions based upon the
role a user has.
I''ve been thinking about creating a model User, which has_many :roles,
and
with the Role model which has_many :permissions.
The Permission Model would then just be a set of boolean that signal what he
can/can''t do.
I''m aware that there is the authorizable plugin, which delivers a nice
system, but I''m just trying to build something on my own to get the
feeling
for rails & ruby again. I believe that the above mentioned system would
work, but I''m a bit curious on the dynamic side of it. What
I''d actually
like to know, if it is possible to store the controller & actions
automaticly as properties of the Permission object, or if this has to be
done manually for each one I create?
ALso, I''m relatively new to the entire RoR concept, although I already
had a
first working experience with it, so I''m open to ideas &
suggestions as
well.
--
Arne De Herdt
Blog: http://risusmumblings.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---