How do I add authentication to a POST request on an implementation of hook_menu?
Turns out this is actually really easy.

You can get the current user's roles with:

global $user;
$roles = $user-&gt;roles;


That returns an associative array with the roles as values. Getting the values is trivial with in_array():

if (in_array("Teacher", $user-&gt;roles)) {
  // allow the post request to have effect
}
else {
  // don't go through with the request; return an error
}


Because the module is called during the lifecycle of the Drupal structure, you have access to the whole environment.