Check for permissions in template