You have to set and keep track of the the menu type for all players (e.g. in a global variable) which you are not even attempting to do. So, currently the handler doesn't know how to handle a menu item selection. Also, you shouldn't be checking flags in the handler, check them before you show the menu and don't show the menu at all if they don't have access.
Finally, you're printing a message saying "you don't have access" even though you just performed the action.