Fix wrong check for node permissions.