Renamed function "isAllowed" to the more succinct "can"