A way to set levels of access to users
dcrespo
dcrespo at gmail.com
Fri Oct 14 17:25:20 EDT 2005
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
More information about the Python-list
mailing list