modify hasPermission to be available to the client