def can_view_courses_for_username(requesting_user, target_username):
 if (requesting_user.username == target_username):
  return True
 elif (not target_username):
  raise TypeError('target_username must be specified')
 else:
  staff = GlobalStaff()
  return staff.has_user(requesting_user)

def can_view_courses_for_username ( requesting_user , target_username ) : if ( requesting_user . username == target_username ) : return True elif ( not target_username ) : raise TypeError ( 'target_username must be specified' ) else : staff = GlobalStaff ( ) return staff . has_user ( requesting_user )
determine whether requesting_user has permission to view courses available to the user identified by target_username .