Changes between Version 41 and Version 42 of BluePrintAuthenticationAccess


Ignore:
Timestamp:
01/30/09 22:05:26 (16 years ago)
Author:
Fran Boon
Comment:

Additional roles such as Country/Regional Admin, Organisation/Office/Camp Admin are set within the GIS/OR/CR modules respectively.

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintAuthenticationAccess

    v41 v42  
    3434(NB The Vol module currently uses a separate method)
    3535
    36 We also want to look at whether we should link the AAA t2_person table with the [BluePrintPersonRegistry Person Registry]'s person table
     36We also want to look at whether we should link the Auth sahana_person table with the [BluePrintPersonRegistry Person Registry]'s person table
    3737
    38 here are the current roles currently pre-defined during initialisation in {{{_db.py}}}:
     38The admin role is pre-defined during initialisation in {{{_db.py}}} (The first user to register will have this role by default):
    3939{{{
    40 table='t2_group'
    41 # Populate table with Default options
    42 if not len(db().select(db['%s' % table].ALL)):
    43         # Default
    44     #db['%s' % table].insert(
    45     #    name="Anonymous User",
    46         #)
    47         db['%s' % table].insert(
    48         name="Administrator",
    49         description="System Administrator - can access & make changes to any data",
    50         )
    51     # t2.logged_in is an alternate way of checking for this role
    52         db['%s' % table].insert(
    53         name="Registered User",
    54         description="A registered user in the system (e.g Volunteers, Family)"
    55         )
    56         db['%s' % table].insert(
    57         name="Super User",
    58         description="Global Head of Operations - can access & make changes to any data"
    59         )
    60         db['%s' % table].insert(
    61         name="Regional Admin",
    62         description="Can make changes to any data within a given Region"
    63         )
    64         db['%s' % table].insert(
    65         name="Country Admin",
    66         description="Can make changes to any data within a given Country"
    67         )
    68         db['%s' % table].insert(
    69         name="District Admin",
    70         description="Can make changes to any data within a given District"
    71         )
    72         db['%s' % table].insert(
    73         name="Organisation Admin",
    74         description="Can make changes to any data within a given Organisation"
    75         )
    76         db['%s' % table].insert(
    77         name="Office Admin",
    78         description="Can make changes to any data within a given Office"
    79         )
    80         db['%s' % table].insert(
    81         name="Camp Admin",
    82         description="Can make changes to any data within a given Camp"
    83         )
     40table = '%s_group' % app
     41# 1st-run initialisation
     42if not len(db().select(db[table].ALL)):
     43    auth.add_group('Administrator',description='System Administrator - can access & make changes to any data')
     44    # 1st person created will be System Administrator (can be changed later)
     45    auth.add_membership(1,1)
    8446}}}
    8547
    86 
     48Additional roles such as Country/Regional Admin, Organisation/Office/Camp Admin are set within the GIS/OR/CR modules respectively.
    8749=== Implementation ===
    8850S3 builds on the default T2 AAA system: