Dc/Melanie | #2527 |Moving from middleware to view level check