@Override
    public boolean canPublish(Node node, JID entity) {
        NodeAffiliate nodeAffiliate = node.getAffiliate(entity);
        return nodeAffiliate != null && (
                nodeAffiliate.getAffiliation() == NodeAffiliate.Affiliation.publisher ||
                        nodeAffiliate.getAffiliation() == NodeAffiliate.Affiliation.owner);
    }
Publishers and owners may publish items to the node.

@author Matt Tucker
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/models/OnlyPublishers.java