serge's profileSerge Luca . ECM & Share...PhotosBlogLists Tools Help

serge Luca

Occupation
Location
Interests
MVP
Sharepoint 2007 Senior Architect & Project Manager
Devoteam Belgium Sharepoint Practice Manager

Serge Luca . ECM & Sharepoint Adventures

June 17

my 5th webcast published

My Fifth webcast on Sharepoint  for Microsoft Belux has recently been published; in this video, I show how show you how to quickly create Sharepoint workflows with aspx association and initiation forms.This demo is based on my Generic Framework uploaded to codeplex.





May 28

Ineta speaker at the Macedonian Code Camp

I will be Ineta speaker at the Macedonian Code Camp in 2 weeks organized by the Macedonian.Net User Group. This is my third stay in Macedonia, and I really love it.

More details here.

I will present 2 intensive sessions on Sharepoint.

image

 

image



May 24

My generic Framework for aspx sharepoint workflow forms has been uploaded to Codeplex

image

I’m currently working on a screencast for Microsoft Belux to better illustrate it. Stay tuned !

I shortly described it in a previous post.


How to allow Full Control permission to a user in a Sharepoint List

The SPWeb has a  RoleDefinitions property that return a list of SPRoleDefinition.

Each SPRoleDefinition is a permission level ; for instance in the next code snippe,t web.Roledefinitions will return a collection of 6 roles; they match the permission Levels of the web site :

image

If you want to assign a permission level to a user on a specific list, you need to create a new RoleAssignement (SPRoleAssignment class) that can be added to the SPList. The new permission must be linked to the role assignment by adding it to a collection called RoleDefinitionBindings.

 

SPWeb web =SPControl.GetContextWeb(HttpContext.Current); //  use RunWithElevatedPrivilege here
SPList myList = web.Lists["MyList"];
myList.BreakRoleInheritance(false);
SPRoleDefinition fullRoleDef = web.RoleDefinitions["Full Control"];
SPUser user = web.EnsureUser(“LITWARE\SERGE”);
SPRoleAssignment newRoleassignment= new SPRoleAssignment(user);
newRoleassignment.RoleDefinitionBindings.Add(fullRoleDef);
myList.RoleAssignments.Add(newRoleassignment);
myList.Update();


Small update to my Download Sharepoint solution package utility uploaded to Codeplex

 

just a simple bug fix.This utility allows Sharepoint administrators and developers  to download a solution package from the Sharepoint solution store (for instance to compare it with another one); I’ve recently faced this situation: we had a solution package in our staging farm, but we wanted to compare the files (features) with our development code.

I’ve created 2 versions of this utility : a Windows Form version and a stsadm extension .

image

Run the Windows Form version on the Sharepoint farm

 

image

 

Select a package and click on the “Download package” button, to bring it to the file system.Easy ?

image

To use the stsadm version :

  1. register the DownloadWSPStsadm.dll into the gac..
  2. copy the stsadmcommands.downloadwsp.xml file to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG
  3. run the stsadm –o downloadsolution option with the –filename and –storeto parameters as described in the picture below (the destination directory must be created before running the command)

 

image