Foros de discusión

Updating Permissions on Multiple Documents

thumbnail
Peter Hancox, modificado hace 11 años.

Updating Permissions on Multiple Documents

Junior Member Mensajes: 45 Fecha de incorporación: 6/07/05 Mensajes recientes
Looking for suggestions on how to set permissions on a large number of documents in the document library without doing each one individually through the web interface. Doesn't need to be user friendly as it should be a once off exercise. i.e., a database script would be OK. Liferay version is 5.2.3

By way of background, we appear to have been subject to an SQL injection attack at some point in the past. Doesn't appear to have caused any issues with day to day operation of the site, but the NAME column in the RESOURCECODE table has been corrupted. This breaks the permissions algorithm conversion routines and may well have introduced other issues that we aren't aware of. Consequently, we're attempting to move to a clean 5.2.3 instance via LAR export. After that we'll be upgrading to current version using standard database upgrade procedure.

We've managed to get most of the data across OK with a few manual fix ups required. However, guest view access has been lost to most of the imported documents. As most documents require public view access I'm looking for a way to achieve this with least effort. A script run directly against the database would be fine as hopefully we'll only need to do this once but I can't find any documentation on what changes would be required to the database. Perhaps this is too complex depending on the database schema? Since this is version 5.2.3, the permissions algorithm is version 5.

Open to any other suggestions.

THANKS
thumbnail
Peter Hancox, modificado hace 11 años.

RE: Updating Permissions on Multiple Documents

Junior Member Mensajes: 45 Fecha de incorporación: 6/07/05 Mensajes recientes
Would it be possible to do this with a Groovy script and ServiceBuilder interface? If so, can it be done in version 5.2.3 or should we migrate to 6.1.1 first and then update the document permissions via a script run from the Control Panel?

Any pointers to sample scripts for updating Document Library content? Presume this changes with the new Documents and Media portlet?
Taruchit Goyal, modificado hace 4 años.

RE: Updating Permissions on Multiple Documents

Junior Member Mensajes: 60 Fecha de incorporación: 16/03/18 Mensajes recientes
The issue got resolved by adding following property to portal-ext.properties
permissions.view.dynamic.inheritance=true And then restarted the server.