s.isAllowed is not a function