Changed twig to use Permission constants instead and fixed const typo