Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Implemention of Access Control

by arcnon (Monk)
on Nov 02, 2007 at 14:52 UTC ( [id://648659]=note: print w/replies, xml ) Need Help??


in reply to Implemention of Access Control

when you login successfully create a profile for that user. In that profile I give a access level. Usually the columns from a user table in my database. Next create a hash with a "link_name" => "access_level" relationship.
When building your menu...
if ($profile{permissions} == $menu{link_access}) { print .... html to the link }
On a side note I use this method BUT it can turn into quite a mess depending on the complexity of the access condtional so plan carefully.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://648659]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-19 17:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found