How to use Liferay's permission system in other applications?

▼魔方 西西 提交于 2019-12-04 14:49:35

I know this is old but I wanted to answer this anyway for future reference.

You have a novel idea here but I don't quite understand yet how do you plan to check if a user has a specific permission in your application. Do you plan to query the Liferay JSON-WS API on every request to verify you have permission? If you do it on the server side then you might get a performance penalty but otherwise the idea seems OK. But don't do it on the client side (in-browser via javascript) - The user could manipulate the request or response to gain access to sensitive information.

As far as I know you cannot define Permissions and Resources using the JSON-WS API but they are stored in the database and you CAN create your own JSON-WS service via Service Builder to expose those features for your application.

As far as defining the permissions goes - Since you are going to have to build your own service to manage things anyway then you might as well define your permissions using the proper XML based configuration and deploy those along with the service.

I'm a little bit curious on what solution you ended up with because I assume that you have already finished this project.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!