Template authorization

User permission should be checked on template submit.