Run permissions code first.