To everyone,

     I am faced with the task of developing a user session/permission 
scheme for a pretty large project.  The object is to make a very 
flexible scheme that allows an admin to create certain types of users 
and allow them to perform tasks that pertain to that type of user.  The 
decision has been made (although I can change it) to use a 
user-type/run-mode permission scheme.  I created a database that handles 
which users are which type and which types have access to which mode.  I 
even have it working :-)

Here are the two questions:

1.) Is this a stupid way to do this?  What is the "Best" way?

     and

2.) Is there a better way to implement it using CGI::App than what I 
have below.

The modes are given unique ids that are hard coded in.  Each run-mode 
looks like this:

sub Mode
{
    my $self = shift;
    my $admin = $self->param('admin');

    # Check for permission.
    if ($admin->checkPermission('ModuleName_Mode '))
    {
            # The have permission so go ahead
    }
    else
    {
            # They do not have permission so tell them.
    }
}

-- 
Thanks,
Kenny Pyatt
President
Design Shack
www.dshack.com



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to