#NEWLINE# def has_group_perms( self , perm , obj , approved ) : #NEWLINE# #INDENT# '\n        Check if group has the permission for the given object\n        ' #NEWLINE# if ( not self . group ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if self . use_smart_cache : #NEWLINE# #INDENT# content_type_pk = Permission . objects . get_content_type ( obj ) . pk #NEWLINE# def _group_has_perms( cached_perms ) : #NEWLINE# #INDENT# return cached_perms . get ( ( obj . pk , content_type_pk , perm , approved ) ) #NEWLINE# #UNINDENT# return _group_has_perms ( self . _group_perm_cache ) #NEWLINE# #UNINDENT# return Permission . objects . group_permissions ( self . group , perm , obj , approved ) . filter ( object_id = obj . pk ) . exists ( )