permissions - MOSS - Programatically set SpecialPermissions -
I have a strong workflow where on the first form, the user can choose a collaborator to evaluate it. Select User A Select user b.
After the submission of the form, a new job has been created for User B to evaluate user A.
My problem is that I need to make sure the work is only available to User A, and the user is not in B, not another user in the system.
I tried to set the property for special practice, but the property can be constituted when the workflow has been given immediately, so I still do not know that the user A (User B in this case) will be chosen, and can not set permissions again.
I also do not care about specialty
property method, but MOSS new permissions.
What is the right way to set permissions on a workflow?
How am I doing here ... this is a mess of code which I have spread across multiple Work
spListItem.BreakRoleInheritance (wrong); Foreach (spRoleAssignment spRistAssignment in spListItem.RoleAssignments) {if (! SpRoleAssignment.RoleDefinitionBindings.Contains (This workflowproperties web.Rediffinfiz.GetByType (SPRoleType.Administrator))} {// Admin SPRoleAssignment.RoleDefinitionBindings.RemoveAll () do not delete; SpRoleAssignment.Update (); }} SPRoleDefinition roledefinition = web.RoleDefinitions.GetByType (SPRoleType.Contribute); SPRoleAssignment myRoleAssignment = New SPRoleAssignment (account name, "", "", ""); MyRoleAssignment.RoleDefinitionBindings.Add (roledefinition); SpListItem.RoleAssignments.Add (myRoleAssignment);
Comments
Post a Comment