04-17-2014 07:13 AM
Hi There,
How can I programmatically add tenant Administrators?
I'm currently trying this:
String query = String.format(
"SELECT * FROM Document WHERE tenantconfig:tenantId = '%s'",
tenantId);
List<DocumentModel> docs = session.query(query);
if (!docs.isEmpty()) {
DocumentModel tenant = docs.get(0);
List<String> tenantAdministrators = (List<String>) tenant.getPropertyValue(TENANT_ADMINISTRATORS_PROPERTY);
tenantAdministrators.add("some username");
tenant.setProperty("tenantconfig","administrators", tenantAdministrators);
}
But this does not seem to work.
Thanks in advance, Bauke Roo
04-17-2014 08:03 AM
It seems to be still early in the morning...
It is needed to save the document after changing the property 🙂
session.saveDocument(tenant);
session.save();
Bauke Roo
01-15-2020 01:21 AM
hi ,
i am developing a small application to handle multi domain as Multi Tenant , i am able to see the changes or List of Tenant in the Nuxeo ui but i am developing the application using angular 8 as a frontend and middleware is java spring boot api which is implementing the java client sdk of nuxeo . but i did not find any class or methods in java client sdk which gives me the Multi tenant manipulation like
thanks Bhagat Singh
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.