authentication/admin_authentication.py
def assert_admin(study_id):
    """ This function will throw a 403 forbidden error and stop execution.  Note that the abort
        directly raises the 403 error, if we don't hit that return True. """
    session_researcher = get_session_researcher()
    if not session_researcher.site_admin and not session_researcher.check_study_admin(study_id):
        flash("This user does not have admin privilages on this study.", "danger")
        return abort(403)
    # allow usage in if statements
    return True
 This function will throw a 403 forbidden error and stop execution.  Note that the abort
        directly raises the 403 error, if we don't hit that return True. 
This function will throw a 403 forbidden error and stop execution.  Note that the abort
directly raises the 403 error, if we don't hit that return True.
This function will throw a 403 forbidden error and stop execution . Note that the abort directly raises the 403 error if we don ' t hit that return True .
def assert_admin(study_id):
    session_researcher = get_session_researcher()
    if not session_researcher.site_admin and not session_researcher.check_study_admin(study_id):
        flash("This user does not have admin privilages on this study.", "danger")
        return abort(403)
    return True
def assert_admin ( study_id ) : session_researcher = get_session_researcher ( ) if not session_researcher . site_admin and not session_researcher . check_study_admin ( study_id ) : flash ( "This user does not have admin privilages on this study." , "danger" ) return abort ( 403 ) return True
This function will throw a 403 forbidden error and stop execution.
This function will throw a 403 forbidden error and stop execution .
""" This function will throw a 403 forbidden error and stop execution.  Note that the abort
        directly raises the 403 error, if we don't hit that return True. """ # allow usage in if statements
study_id