access middleware support for class views