#NEWLINE# def _assign_default_perms( self , app , model , department , instance ) : #NEWLINE# #INDENT# groups = self . orm . DepartmentGroup . objects . filter ( department = department , system_name__in = [ 'user' , 'admin' ] ) #NEWLINE# for group in groups : #NEWLINE# #INDENT# for action in [ 'view' , 'execute' ] : #NEWLINE# #INDENT# self . assign_perm ( ( '%s.%s_%s' % ( app , action , model ) ) , group , instance ) #NEWLINE# #UNINDENT# if ( group . system_name == 'admin' ) : #NEWLINE# #INDENT# self . assign_perm ( ( '%s.%s_%s' % ( app , 'change' , model ) ) , group , instance )