#NEWLINE# def has_perms( self , perm_list , obj = None ) : #NEWLINE# #INDENT# '\n        Returns True if the user has each of the specified permissions.\n        If object is passed, it checks if the user has all required perms\n        for this object.\n        ' #NEWLINE# for perm in perm_list : #NEWLINE# #INDENT# if ( not self . has_perm ( perm , obj ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return True