@classmethod
def _filter_by_user_role(cls, predicate):
    from ggrc_basic_permissions.models import Role, UserRole
    return UserRole.query.join(Role).filter((((UserRole.person_id == cls.id) & (UserRole.context_id == None)) & predicate(Role.name))).exists()
@classmethod
def _filter_by_user_role(cls, predicate):
    from ggrc_basic_permissions.models import Role, UserRole
    return UserRole.query.join(Role).filter((((UserRole.person_id == cls.id) & (UserRole.context_id == None)) & predicate(Role.name))).exists()