留言板

Custom permissions checker in Liferay 7

Enrico Costanzi,修改在6 年前。

Custom permissions checker in Liferay 7

New Member 帖子: 21 加入日期: 17-2-11 最近的帖子
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,修改在6 年前。

RE: Custom permissions checker in Liferay 7 (答复)

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
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,修改在4 年前。

RE: Custom permissions checker in Liferay 7

New Member 帖子: 2 加入日期: 20-1-22 最近的帖子
Hi, do we still have this limitation in the latest version 7.2.0 GA2 ? 
thumbnail
Tomas Polesovsky,修改在4 年前。

RE: Custom permissions checker in Liferay 7

Liferay Master 帖子: 676 加入日期: 09-2-13 最近的帖子
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