Added middleware models dependencies. Middleware works before permission checks. All methods launchs with this context