I am using
WorkflowManagementServer MgmtServer = new WorkflowManagementServer ();
// Create instance of the Permissions and ProcSetPermissions class
Permissions permissions = new Permissions();
ProcSetPermissions procPermissions = new ProcSetPermissions();
// Set the required permission properties
procPermissions.ProcSetID = 1;
procPermissions.UserName = userName;
procPermissions.Admin = true;
procPermissions.Start = true;
procPermissions.View = false;
procPermissions.ViewPart = false;
procPermissions.ServerEvent = false;
// Add the ProcSetPermissions object to the Permissions object
permissions.Add(procPermissions);
// Multiple permissions can also be added
// for other process sets
ProcSetPermissions procPerms2 = new ProcSetPermissions();
procPerms2.ProcSetID = 2;
procPerms2.UserName = userName;
procPerms2.Admin = true;
procPerms2.Start = true;
procPerms2.View = false;
procPerms2.ViewPart = false;
procPerms2.ServerEvent = false;
permissions.Add(procPerms2);
// Update the permissions
bool updated = MgmtServer.UpdateUserPermissions(userName, permissions);
Does this UpdateUserPermissions method create user on to K2 if the user is not present ??
What rights should one need to add users on to K2 using above code???
Thanks in advance