Access callback: Determines access to dismiss the accessibility message.
TRUE if the user has permission to dismiss the accessibility message or if the user is anonymous. FALSE if otherwise.
overlay_user_dismiss_message()
function overlay_user_dismiss_message_access() {
global $user;
if (!user_access('access overlay')) {
return FALSE;
}
// It's unlikely, but possible that "access overlay" permission is granted to
// the anonymous role. In this case, we do not display the message to disable
// the overlay, so there is nothing to dismiss.
if (empty($user->uid)) {
return FALSE;
}
return TRUE;
}