Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Implementing ACL or Privileges

by submersible_toaster (Chaplain)
on Apr 16, 2005 at 04:01 UTC ( #448406=perlquestion: print w/replies, xml ) Need Help??

submersible_toaster has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks
Having maintained (hacked) an RT system for some years now, I have come to respect it's group and user 'Rights' model of access control.

I seek the collective wisdom for suggestions regarding implementing similar controls in a more generic way for example.

my $user = App::User->load( $someid ); if ($user->can_modify) { $app->modify_document( \%args ); } else { $app->error( 'Access denied: you are not allowed to modify documen +ts' ); }

My goal is to provide more granular control over user's rights in a web application context, rather than a rudimentary Admin/User distinction where admins can do anything and users only basic things.

Update : Data::ACL looks like a candidate.
Decision::ACL somewhat more sophisticated.

Update : Ammended links above as CPAN, thanks cazz.

I can't believe it's not psellchecked

Replies are listed 'Best First'.
Re: Implementing ACL or Privileges
by insaniac (Friar) on Apr 16, 2005 at 11:37 UTC
    Don't know if this will help you, but, do you know Maypole? ( They have a Maypole::Plugin::Authorization which seems to do exactly what you want..
    maybe you can get some inspiration from their code..

    to ask a question is a moment of shame
    to remain ignorant is a lifelong shame

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://448406]
Approved by BrowserUk
Front-paged by Courage
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2019-05-21 08:32 GMT
Find Nodes?
    Voting Booth?
    Do you enjoy 3D movies?

    Results (131 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!