check initiator access to replicate the payload from workflow
trying to check if user/initiator who run a request for activation workflow, had enough permission to activate the page. depending on the user access, I am trying to update the workflow model under OR split. used below code to get the user privileges
Session session = resourceResolver.adaptTo(Session.class);
AccessControlManager acm = session.getAccessControlManager();
Privilege p[] = UIHelper.getAllPermission(acm, resource);
Issue is session.getUserID() return the workflow user, Need a way to get the session adaptTo initiator userID().
Please let me know, if any suggestions to achieve it or suggest if any alternate approach to check user has permission to replicate the page.
Thanks!