Added function in notificationManager to check if a user has the required roles to receive a notification.