Change function permissions so that res xml has access