Apr8

Set user permissions for a Website with Nintex

Tags: Nintex Workflow, PowerActivity, PowerShell, SharePoint

If you use the "Create a Site" activity with Nintex Workflow 2007, there is no way to assign detailed user permissions for the newly created site - you can only choose to either inherit the permissions from the parent site or you can manually set a single user as site owner.

But here is the solution: Use the Data One PowerActivity and a few straightforward lines of PowerShell code to manage the user permissions and roles in detail!

   

$webDestination = get-spweb "{WorkflowVariable:AbsolutURL}"

$webDestination.BreakRoleInheritance($true)

$roleAssignment = new-object Microsoft.SharePoint.SPRoleAssignment -argumentList "domain\user"

$roleDefinition = $webDestination.RoleDefinitions["Contribute"]

$roleAssignment.RoleDefinitionBindings.Add($roleDefinition)

$webDestination.RoleAssignments.Add($roleAssignment)

$webDestination.Dispose()

Insert the PowerActivity after the "Create a site" activity within the Nintex Workflow Designer canvas. Paste the PowerShell snippet into the PowerActivity. Use $webDestination to set the new site's URL, which you can easily obtain from the "Create a site" activity (configuration dialog > Store URL in). Set -argumentList and RoleDefinitions["Contribute"] according to your requirements. Run your workflow and see for yourself that all permissions have been created automatically.

Regards,

Andreas

 
Dec5

Introducing: Data One PowerActivity for Nintex

Tags: Data One, Nintex Workflow, PowerShell, SharePoint, PowerActivity
Was ist die PowerActivity? Die Data One PowerActivity ist eine Aktion für Nintex Workflow, die beliebige Windows PowerShell-Skripte ausführt. So lassen sich die Vorteile des SharePoint-Objektmodells auf einfache Art und Weise mit den Vorteilen von Nintex Workflow und der Windows PowerShell kombinieren. Ideal für Rapid Development und Proof-of-Concept Studien.
 
 
Im folgenden Screencast stelle ich kurz die Data One PowerActivity für Nintex Workflow vor.

By Christian Glessner