I'm considering using Liferay's permission system to implement access security in an external Java application (not a portlet). Liferay has robust features for managing users, groups, roles, permissions and resources. It would be great if I could leverage those instead of re-inventing the wheel in our external app.
Liferay and our external application are configured to use the same CAS and LDAP for authentication, so they share the same users.
So far I've successfully used Liferay's JSON-WS API to manage a user's Roles. This is great but I need to take it to the next step.
Can I define and manage Liferay Permissions and Resources using the JSON-WS API?
I see API methods for checking if a user has certain permissions (ie. has-user-permission) but I don' see methods for creating and assigning Permissions and Resources.
Admittedly, I need to better understand how permissions and actions are defined in Liferay. From what I understand, permissions and actions are defined in XML files which are associated with specific portlets.
In our case, the external app won't have any portlets so how would I define custom permissions and actions? (maybe create a custom portlet which is only used for defining actions and resources?). I would still need a way to define resources programmatically since resources would need to be created for certain domain objects in our external app.