jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clay Ferguson <wcl...@gmail.com>
Subject Re: Public link for jcr documents
Date Tue, 23 Feb 2016 01:26:08 GMT
I hope this is helpful and not an oversimplification of what you're after,
but here's how I make a node public in meta64 (search it on GitHub):

public static void makeNodePublic(Session session, Node node) throws
Exception {
List<String> privileges = new LinkedList<String>();
privileges.add(Privilege.JCR_READ);
grantPrivileges(session, node, EveryonePrincipal.getInstance(), privileges);
}

Cheers, and happy Jackrabbiting.


Best regards,
Clay Ferguson
wclayf@gmail.com


On Sun, Feb 21, 2016 at 7:27 AM, rohitiwari30oct <rohitiwari30oct@gmail.com>
wrote:

> Hi,
>
> I had developed a web portal for creating, uploading file/folders using
> Jackrabbit 2.8.1 and Jcr 2.0. I usually provide access for docs with LDAP
> authentication but in some cases I required a way to get public access url
> for some of our users. If any one can help it would be highly appreciable.
>
>
>
> --
> View this message in context:
> http://jackrabbit.510166.n4.nabble.com/Public-link-for-jcr-documents-tp4663698.html
> Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.
>

Mime
View raw message