| 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 | | ) |
| | 40 | table = '%s_group' % app |
| | 41 | # 1st-run initialisation |
| | 42 | if 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) |