On previous post i spoke about similar question:
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/f6c1b3a546e7e240/40233a3286dfdccf?hl=en&lnk=gst&q="Admin+and+Dry"#40233a3286dfdccf
I have done the same thing that are you speaking about, but
controllers/actions was created on a migration. I think that this should
be
moved to a rake task too.
I think that engines like User Engine have problems for me, and so, i
create
RBAC system myself. On my system, i have more than just
controller/action or
“permissions” models, i have tools_categories that group actions
behind
some “tool”. Each permission is maded by relationships between
tools_categories and roles through functions (where functions is just
C-R-U-D at now). The system “introspect” function of each action based
on
his name (ugly, but works). When you specify a permission you just say
that
some role have access to create and read, but not update or delete on a
specific tool. This is very simple to use and configure and works fine
for
me.
To help me, i just add some useful methods to user model, like
canCreate?(action) or canUpdate?(action) and i just overwrite link_to***
helpers to return “” if user has no access to relative access.
Note: actions like ‘‘new’’ should be classified as C (create), so links
for
new never will appear if the role has no permissions to create. This
give
more freedom to write my code, without many IFs on all views…
I can give you all this code, but it’s in portuguese until now, . I
will
translate all and move to engine in a few days. If you want to help me,
i
will be grateful.
On Dec 28, 2007 5:23 PM, Matt J. < [email protected]> wrote:
controller_files = Dir[RAILS_ROOT +
def iterate_over_controllers
generating them on the fly.
What I’m trying to do is implement a Role Based Access Control (RBAC)
provides via self reflection.
clue me in.
On Dec 27, 2007 11:32 PM, Crispy [email protected] wrote:
Evaluation failed. Reason(s):
Jabber: [email protected]
“If art interprets our dreams, the computer executes them in the guise
of
programs!” - Alan J. Perlis- Hide quoted text -
–
Everton J. Carpes
Mobile: +55 53 9129.4593
MSN: [email protected]
UIN: 343716195
Jabber: [email protected]
“If art interprets our dreams, the computer executes them in the guise
of
programs!” - Alan J. Perlis