#NEWLINE# def unused_loosen_requirements( self , actor ) : #NEWLINE# #INDENT# 'Retain only those requirements of `self` which are\n        also in `actor`.\n\n        For example an InsertFormPanel has initially the requirements\n        of the actor who defines it. That actor may not be visible to\n        the current user.  But the panel may be used by other actors\n        which are visible because they have less requirements.\n\n        ' #NEWLINE# if ( self . layout_handle . layout . _datasource == actor ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# s1 = self . required_roles #NEWLINE# self . required_roles = ( self . required_roles & actor . required_roles ) #NEWLINE# loosened = ( s1 != self . required_roles ) #NEWLINE# if loosened : #NEWLINE# #INDENT# self . install_permission_handler ( )