#NEWLINE# def user_packages( self , user ) : #NEWLINE# #INDENT# "\n        Retrieve a list of [role_name, package_name] for a given username.\n        Role is either 'Maintainer' or 'Owner'. \n        " #NEWLINE# session = DBSession ( ) #NEWLINE# owned = Package . by_owner ( session , user ) #NEWLINE# maintained = Package . by_maintainer ( session , user ) #NEWLINE# owned = [ ( 'Owner' , user . name ) for p in owned ] #NEWLINE# maintained = [ ( 'Maintainer' , p . name ) for p in maintained ] #NEWLINE# return ( owned + maintained )