Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 48 and Version 49 of IdentityManagement


Ignore:
Timestamp:
04/08/06 23:40:57 (13 years ago)
Author:
fredlin
Comment:

Visit/Identity? changes

Legend:

Unmodified
Added
Removed
Modified
  • IdentityManagement

    v48 v49  
    112112Click "Add TG_Group+" button. 
    113113 
    114 Then add the displayName and groupId 
     114Then add the display_name and group_name 
    115115 
    116116{{{ 
    117117ex:  
    118 displayName : Administrators 
    119 groupId :admin 
     118group_name :admin 
     119display_name : Administrators 
    120120}}} 
    121121 
     
    131131{{{ 
    132132ex:  
    133 displayName : Fred Lin 
    134 userId : root 
    135 emailAddress : ooo@xxx.oo 
     133user_name : root 
     134email_address : ooo@xxx.oo 
     135display_name : Fred Lin 
    136136password : ooxx 
    137137}}} 
     
    266266>>> from turbogears.identity.soprovider import * 
    267267>>> hub.begin() 
    268 >>> u=TG_User( userId="jeff", emailAddress="jeff@metrocat.org", 
    269             displayName="Jeff Watkins", password="xxxxx" ) 
    270 >>> g=TG_Group( groupId="admin", displayName="Administrators" ) 
     268>>> u=TG_User( user_name="jeff", email_address="jeff@metrocat.org", 
     269            display_name="Jeff Watkins", password="xxxxx" ) 
     270>>> g=TG_Group( group_name="admin", display_name="Administrators" ) 
    271271>>> hub.commit() 
    272272>>> 
     
    422422=== Retrieve user identity infomation === 
    423423 
    424 We can access the entire User object by accessing "turbogears.identity.current.user" to get user identity infomation. This gives you access to the userId, displayName, emailAddress, and creation date. 
     424We can access the entire User object by accessing "turbogears.identity.current.user" to get user identity infomation. This gives you access to the user_name, display_name, email_address, and creation date. 
    425425 
    426426=== Retrieve users’ group identity infomation === 
     
    440440#!python 
    441441from turbogears import identity 
    442 if 'admin' in [g.groupId for g in identity.current.user.groups]: 
     442if 'admin' in [g.group_name for g in identity.current.user.groups]: 
    443443    pass 
    444444}}} 
     
    454454---- 
    455455 
    456  
    457  
    458456#TODO using SQLAlchemy instead of SQLObject 
    459457