Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Mat Pink
Request Edit Permission for a Page
March 6, 2013 7:08 PM
Answer

Mat Pink

Rank: New Member

Posts: 8

Join Date: February 6, 2013

Recent Posts

Hi,

I have a requirement where a user should be able to request permission to edit a Wiki page via a hyperlink. I could easily do this via an email notification, but my requirement requires me to use a Task Manager within Liferay.

So I am wondering how I could go about doing this using Workflow. I was thinking of maybe creating a Custom asset which triggers a workflow when the link is clicked, and then a Workflow task is added to the appropriate 'approvers'. They can then approve the workflow (or deny), which would execute a Groovy script that assigns the user permissions to the requested Wiki page.

Note. The actual scripting of the permission process via Groovy is only a nice to have - what is mandatory is getting a Task to a user which they can either approve (manually giving permissions is fine), or deny.

Does anybody have any thoughts on this proposal - or am I overcomplicating things and is there functionality like this that exists and I am re-inventing the wheel?

Many thanks
Mat
Mat Pink
RE: Request Edit Permission for a Page
March 13, 2013 6:05 PM
Answer

Mat Pink

Rank: New Member

Posts: 8

Join Date: February 6, 2013

Recent Posts

For anyone interested, I implemented this functionality as described by:

1) Creating a new bunch of services that implement the workflow model.
2) Use WorkflowHandlerRegistryUtil.startWorkflowInstance to start a workflow instance on a hyperlink click.
3) Couple the new workflow instance with the requested wiki page, which can be accessed via groovy in the workflow definition xml file to assign permissions to the wiki etc.

Cheers.
Mat