A way to set levels of access to users

Discussion in 'Python' started by dcrespo, Oct 14, 2005.

  1. dcrespo

    dcrespo Guest

    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
    dcrespo, Oct 14, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sara rafiee
    Replies:
    3
    Views:
    1,057
    Scott Allen
    Oct 4, 2004
  2. Sunil Miriyala
    Replies:
    0
    Views:
    758
    Sunil Miriyala
    Mar 1, 2004
  3. Siemel Naran
    Replies:
    1
    Views:
    356
    Peter Koch Larsen
    Mar 10, 2005
  4. Dave
    Replies:
    1
    Views:
    414
    Alf P. Steinbach
    Jul 22, 2005
  5. anikispp

    access levels in inheritance

    anikispp, Jan 17, 2010, in forum: Java
    Replies:
    1
    Views:
    332
    anikispp
    Jan 18, 2010
Loading...

Share This Page