Connect middleware for access by permission checks at route level