Moved code for replacing permissions to WorkflowPermission model.
Authored by: jplang 2012-07-15
Parent: [r9986]
Child: [r9988]