def get_user_role(user, course_key):
 role = get_masquerade_role(user, course_key)
 if role:
  return role
 elif has_access(user, 'instructor', course_key):
  return 'instructor'
 elif has_access(user, 'staff', course_key):
  return 'staff'
 else:
  return 'student'

def get_user_role ( user , course_key ) : role = get_masquerade_role ( user , course_key ) if role : return role elif has_access ( user , 'instructor' , course_key ) : return 'instructor' elif has_access ( user , 'staff' , course_key ) : return 'staff' else : return 'student'
what type of access: staff or instructor does this user have in studio? no code should use this for access control .