Changes between Version 33 and Version 34 of BluePrintAuthenticationAccess


Ignore:
Timestamp:
01/12/09 18:44:18 (15 years ago)
Author:
Fran Boon
Comment:

Roles updated to current

Legend:

Unmodified
Added
Removed
Modified
  • BluePrintAuthenticationAccess

    v33 v34  
    4444 * we should probably support these by adding hooks into the [wiki:BluePrintREST RESTlike controller]
    4545
    46 User maintenance can be done via appadmin until we develop our own UI.[[BR]]
    47 
    48 DRAFT:
    49 
    50 We use {{{t2_group}}} table for Contact Lists information
    51 
    52 We use {{{s3_role}}} table for Security access
     46We use {{{t2_group}}} table for Roles & {{{t2_membership}}} to show which roles a user has.
    5347 * roles initialised in {{{_db.py}}}
     48 * 1st user to register gets Administrator role
    5449 * module writers need to add any required roles there
    5550
    56 Membership of roles is controlled via the Many-to-Many table: {{{s3_roleholder}}}
     51We expose this as s3.roles so that it is accessible to Controllers & Views.[[BR]]
     52e.g.
     53 * {{{appadmin.py}}}
     54 * {{{layout.html}}}
    5755
    58 T3 defines a simple {{{t2.is_admin}}} defined in {{{db.py}}}:
    59 {{{
    60 is_admin=(t2.logged_in and (not settings.administrator_emails or t2.person_email in settings.administrator_emails))
    61 t2.is_admin=is_admin
    62 }}}
    63  * Function components protected with: {{{if not is_admin: t2.redirect('index',flash=T('Not Authorised'))}}}
    64  * appadmin protected in the same way :)
     56User maintenance can be done via appadmin until we develop our own UI:
     57 * ConfigurationGuidelines#Roles
    6558
    6659=== Links ===