A way to set levels of access to users

D

dcrespo

Hi all,

I have this table on a database:

Table: user

coduser | username | password | securitylevel
1 | fcumana |<SHA1pass>| 0123456789qwe

where "securitylevel" is a string where the presence of each character
is a permited key for running certain functions.

For example:

functions.py
-------------------------------------------------
securitylevel=6
def function1():
print "This is the function 'function1'"

....and/or other functions
-------------------------------------------------

Because securitylevel=6 exists in securitylevel in the database, the
user running it is allowed to access.

The lack here is that if there's a lot of functions and users, and I
want to enable certain users to access certain functions, then, it will
get confusing for maintain it.

Any help?

Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top