def check_role(role, meth):
    try:
        patterns = meth._rbac[0]
    except AttributeError:
        raise RoleError('No RBAC for function!')

    for pattern in patterns:
        if fnmatch.fnmatchcase(role, pattern):
            return
    raise RoleError("No access for role '%s'" % role)
Type: Flow or Auxiliary
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/rbac.py/check_role--crossover with--dataset/ETHPy150Open JamesPHoughton/pysd/tests/old_tests/vensim/test_lookups.py/Components.time_step