def certificate():

    mode = session.s3.hrm.mode
    def prep(r):
        if mode is not None:
            auth.permission.fail()
        return True
    s3.prep = prep

    if settings.get_hrm_filter_certificates() and \
       not auth.s3_has_role(ADMIN):
        s3.filter = auth.filter_by_root_org(s3db.hrm_certificate)

    return s3_rest_controller("hrm", resourcename,
                              rheader=s3db.hrm_rheader,
                              csv_template=("hrm", "certificate"),
                              csv_stylesheet=("hrm", "certificate.xsl"),
                              )

# -----------------------------------------------------------------------------
Certificates Controller
dataset/ETHPy150Open sahana/eden/controllers/vol.py/certificate