#NEWLINE# def get_group_permissions( self , obj = None ) : #NEWLINE# #INDENT# '\n        Returns a list of permission strings that this user has through his/her\n        groups. This method queries all available auth backends. If an object\n        is passed in, only permissions matching this object are returned.\n        ' #NEWLINE# permissions = set ( ) #NEWLINE# for backend in auth . get_backends ( ) : #NEWLINE# #INDENT# if hasattr ( backend , 'get_group_permissions' ) : #NEWLINE# #INDENT# if ( obj is not None ) : #NEWLINE# #INDENT# permissions . update ( backend . get_group_permissions ( self , obj ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# permissions . update ( backend . get_group_permissions ( self ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return permissions