Unify the access restriction tests to a single file instead of a different file for every controller.