refactor the global checks to a single method, possibly as a before filter