[Eloy from MDL-14698]
some comments after looking to user/index.php code:
1) The whole drop-down menu is only showed if the user has 'moodle/course:bulkmessaging' capability. Not sure if that "individual" capability is the correct one to decide about the WHOLE drop-down.
2) Messaging system status isn't ever check and it should ($CFG->messaging) together with the 'moodle/course:bulkmessaging' to decide properly about that menu item.
3) Notes are ok, AFAIK, being checked by 'moodle/notes:manage' capability (I don't know it there is any $CF->switch to disable notes (haven't been able to find it).
4) Extend enrol options happens without control at all! 'moodle/course:update' should be checked if I'm not wrong. Also, extended enrolment options should be ONLY available if the course has some sort of enrol limit defined.
5) With all particular permissions calculated in 2) , 3) and 4)... I'd buid the drop-down menu IF the menu has any content. Only if that (instead of 1))