#NEWLINE# def certificate( ) : #NEWLINE# #INDENT# ' Certificates Controller ' #NEWLINE# mode = session . s3 . hrm . mode #NEWLINE# def prep( r ) : #NEWLINE# #INDENT# if ( mode is not None ) : #NEWLINE# #INDENT# auth . permission . fail ( ) #NEWLINE# #UNINDENT# return True #NEWLINE# #UNINDENT# s3 . prep = prep #NEWLINE# if ( settings . get_hrm_filter_certificates ( ) and ( not auth . s3_has_role ( ADMIN ) ) ) : #NEWLINE# #INDENT# s3 . filter = auth . filter_by_root_org ( s3db . hrm_certificate ) #NEWLINE# #UNINDENT# return s3_rest_controller ( 'hrm' , resourcename , rheader = s3db . hrm_rheader , csv_template = ( 'hrm' , 'certificate' ) , csv_stylesheet = ( 'hrm' , 'certificate.xsl' ) )