#NEWLINE# def has_publish_permission( self , request ) : #NEWLINE# #INDENT# if request . user . is_superuser : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# opts = self . _meta #NEWLINE# return ( request . user . has_perm ( ( ( opts . app_label + '.' ) + get_permission_codename ( 'change' , opts ) ) ) and request . user . has_perm ( ( ( opts . app_label + '.' ) + 'publish_page' ) ) )