def department():

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

    if not auth.s3_has_role(ADMIN):
        s3.filter = auth.filter_by_root_org(s3db.hrm_department)

    return s3_rest_controller("hrm", resourcename)

# -----------------------------------------------------------------------------
The interceptor order will be set to 0 when interceptor type is set to
dataset/ETHPy150Open sahana/eden/controllers/vol.py/department--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/cli/test/test_mointerceptorm.py/MoInterceptorArgsTestCases.test_add_defaultinterceptor_without_indicating_order