Foros de discusión

Custom permissions checker in Liferay 7

Enrico Costanzi, modificado hace 6 años.

Custom permissions checker in Liferay 7

New Member Mensajes: 21 Fecha de incorporación: 11/02/17 Mensajes recientes
Is it possible to provide a Permissions Checker via osgi bundle?


With Liferay 6.2 we managed to use a different permissions checker by deploying an ext plugin.
The in portal-ext.properties we inserted the property
permissions.checker=com.example.MyPermissionsChecker
and everything worked fine.

With Liferay7 we weren't able to provide a permissions checker via OSGI, so we ended up copying the bundle into the WEB-INF/lib of the ROOT app.
I hope there's a different way to achieve this, otherwise I don't get the choice of exclude the ext plugins from Liferay 7.
I've heard that they will be reintroduced, but still, if there are custom classes as portal property values, how were these properties supposed be used prior to the GA4?

Don't mean to be rude or criticize, just pointing out few doubts emoticon
thumbnail
David H Nebinger, modificado hace 6 años.

RE: Custom permissions checker in Liferay 7 (Respuesta)

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
No, you can't currently define the permission checker in an OSGi bundle. Rather than copying the lib in manually, though, this is actually a job for the EXT plugin which should be returning in GA4.









Come meet me at the 2017 LSNA!
Noel Abi Abdallah, modificado hace 4 años.

RE: Custom permissions checker in Liferay 7

New Member Mensajes: 2 Fecha de incorporación: 22/01/20 Mensajes recientes
Hi, do we still have this limitation in the latest version 7.2.0 GA2 ? 
thumbnail
Tomas Polesovsky, modificado hace 4 años.

RE: Custom permissions checker in Liferay 7

Liferay Master Mensajes: 676 Fecha de incorporación: 13/02/09 Mensajes recientes
Works in 7.0 too. Just register a new PermissionCheckerFactory to create the custom permissions checker instances. 

​​​​​​​See https://github.com/liferay/liferay-portal/blob/7.0.x/modules/apps/web-experience/staging/staging-security/src/main/java/com/liferay/staging/security/internal/permission/StagingPermissionCheckerFactory.java