config middleware as static method on model
config middleware as static methods,
cms rules moved to cms.js