01-06-2018 04:15 AM
I am trying to assign a permanent permission to a group but in nuxeo permission is not working and it is not assigning to any user. My Code is:
String url = "http://localhost:8080/nuxeo"; NuxeoClient nuxeoClient = new NuxeoClient(url, "Administrator", "Administrator"); org.nuxeo.client.api.objects.Document pathDoc = nuxeoClient.repository().fetchDocumentById(docId); GregorianCalendar begin = new GregorianCalendar(2015, Calendar.JUNE, 20, 12, 34, 56); GregorianCalendar end = new GregorianCalendar(2015, Calendar.JULY, 14, 12, 34, 56); ACE ace = new ACE(); ace.setUsername("user0"); ace.setPermission("Write"); ace.setCreator("Administrator"); ace.setBegin(begin); ace.setEnd(end); ace.setBlockInheritance(true); pathDoc.addPermission(ace);
How can I do this..? Please help me I dont have any other support. Thanks for your support. It will be really helpful for me as I m doing this task since 10 days.
01-10-2018 07:51 AM
Hi,
I don't understand why you're setting a begin and end date in 2015 for a permanent permission. The added permission won't be activated because the date period is over.
You seem to use the 2.x java client, the supported version is 3.x which works with all Nuxeo version starting from LTS 2016 - 7.10.
If you can use 3.x, you'll be able to not set begin/end date to make a permanent permission.
Otherwise, there's a bug on permanent permission in 2.x, you'll need to workaround it. You can follow https://answers.nuxeo.com/general/q/3671a1cd542144219426b315a0fb71a0/How-to-set-permanent-permission... or set an end date in future, in 2100 for instance.
01-15-2018 03:43 AM
Hello,
01-16-2018 05:47 AM
I just tried this test with latest nuxeo java client version (3.0.2-SNAPSHOT) and everything works
01-18-2018 05:34 AM
I want to give permission in nuxeo through nuxeo api. i tried using this following code u wrote above. But I didn't work for me. In backend nuxeo Ui, I can't see the following permission which i have given to specific user.
01-18-2018 06:09 AM
Hi,
01-18-2018 07:10 AM
Okay I'll try this way. and will sent u logs regarding this.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.