zeeguu/api/api/teacher_dashboard/_permissions.py
def has_permission_for_cohort(cohort_id):
    """
    Checks to see if user requesting has permissions
    to view the cohort with id 'cohort_id'
    """
    from zeeguu.core.model import TeacherCohortMap

    maps = TeacherCohortMap.query.filter_by(cohort_id=cohort_id).all()
    for m in maps:
        if m.user_id == flask.g.user.id:
            return True
    return False

    Checks to see if user requesting has permissions
    to view the cohort with id 'cohort_id'
    
Checks to see if user requesting has permissions
to view the cohort with id 'cohort_id'
Checks to see if user requesting has permissions to view the cohort with id ' cohort_id '
def has_permission_for_cohort(cohort_id):
    from zeeguu.core.model import TeacherCohortMap
    maps = TeacherCohortMap.query.filter_by(cohort_id=cohort_id).all()
    for m in maps:
        if m.user_id == flask.g.user.id:
            return True
    return False
def has_permission_for_cohort ( cohort_id ) : from zeeguu . core . model import TeacherCohortMap maps = TeacherCohortMap . query . filter_by ( cohort_id = cohort_id ) . all ( ) for m in maps : if m . user_id == flask . g . user . id : return True return False
Checks to see if user requesting has permissions
to view the cohort with id 'cohort_id'
Checks to see if user requesting has permissions to view the cohort with id ' cohort_id '
"""
    Checks to see if user requesting has permissions
    to view the cohort with id 'cohort_id'
    """
cohort_id