@Override
    public boolean canSubscribe(Node node, JID owner, JID subscriber) {
        // Let node owners and sysadmins always subcribe to the node
        if (node.isAdmin(owner)) {
            return true;
        }
        XMPPServer server = XMPPServer.getInstance();
        for (JID nodeOwner : node.getOwners()) {
            // Give access to the owner of the roster :)
            if (nodeOwner.equals(owner)) {
                return true;
            }
            // Check that the node owner is a local user
            if (server.isLocal(nodeOwner)) {
                try {
                    Roster roster = server.getRosterManager().getRoster(nodeOwner.getNode());
                    RosterItem item = roster.getRosterItem(owner);
                    // Check that the subscriber is subscribe to the node owner's presence
                    return item != null && (RosterItem.SUB_BOTH == item.getSubStatus() ||
                            RosterItem.SUB_FROM == item.getSubStatus());
                }
                catch (UserNotFoundException e) {
                    // Do nothing
                }
            }
            else {
                // Owner of the node is a remote user. This should never happen.
                Log.warn("Node with access model Presence has a remote user as owner: {}",node.getUniqueIdentifier());
            }
        }
        return false;
    }
Anyone with a presence subscription of both or from may subscribe and retrieve items.

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