Forums de discussion

Custom permissions checker in Liferay 7

Enrico Costanzi, modifié il y a 6 années.

Custom permissions checker in Liferay 7

New Member Publications: 21 Date d'inscription: 11/02/17 Publications récentes
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, modifié il y a 6 années.

RE: Custom permissions checker in Liferay 7 (Réponse)

Liferay Legend Publications: 14918 Date d'inscription: 02/09/06 Publications récentes
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, modifié il y a 4 années.

RE: Custom permissions checker in Liferay 7

New Member Publications: 2 Date d'inscription: 22/01/20 Publications récentes
Hi, do we still have this limitation in the latest version 7.2.0 GA2 ? 
thumbnail
Tomas Polesovsky, modifié il y a 4 années.

RE: Custom permissions checker in Liferay 7

Liferay Master Publications: 676 Date d'inscription: 13/02/09 Publications récentes
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