#NEWLINE# def user_principals( self , username ) : #NEWLINE# #INDENT# '\n        Get a list of principals for a user\n\n        Parameters\n        ----------\n        username : str\n\n        Returns\n        -------\n        principals : list\n\n        ' #NEWLINE# principals = [ ( 'user:' + username ) , Everyone , Authenticated ] #NEWLINE# if self . is_admin ( principals ) : #NEWLINE# #INDENT# principals . append ( 'admin' ) #NEWLINE# #UNINDENT# for group in self . groups ( username ) : #NEWLINE# #INDENT# principals . append ( ( 'group:' + group ) ) #NEWLINE# #UNINDENT# return principals