Friday 24 December 2010

Setting permissions on a folder differently to the document library that contains it.

Had a support call come in that someone had lost access to a document library.  Turned out that what had happened was that one of my colleagues had been asked to make a folder in the document library 'secure', accessible only to a restricted group of people.  What he had done was to edit the permissions for the whole document library.

This request is actually pretty unusual for the sites we're running, We have been asked for 'secure' document libraries before but not to 'secure' a folder within a document library.

Securing a document library is done by selecting "Document Library Settings" from the Settings menu when in the Document Library then Manage Permissions  from the settings page that appears.

To do so for a folder first navigate to the parent folder of the folder you want to secure, so if the folder is DocLib\Parent\Child you would navigate to DocLib\Parent.  OPenh the Edit menu for the folder you wish to secure and select Manage Permissions.  This will open the permissions page for the folder.  Unless this folder has previously had it's permissions edited the only available menu will be Actiions.  You will need to open the Action menu and select Edit Permissions as it will be inheriting it's permissions from the parent folder.  This will cause the New menu to appear and will break the link between the permissions for the parent folder and those for this folder.  You can then add and remove users and groups via athe New and Actions menus.  If you change you mind you can also choose to return to inheriting the permissions from the parent folder, from the Actions menu.

Thursday 23 December 2010

To upgrade or not upgrade

Our main site right now is on SharePoint 2007 (WSS 3.0), no MOSS or other fun stuff.  At some point it will move to SharePoint 2010.  There has been a suggestion that we do that in the next couple of months.  Our concern is that we suspect that a number of our custom developments might not survive the migration, there are somethings we can do with ease on SharePoint 2007 that simply fail if we try to do them on 2010, for example graphical alerters in place of numeric fields.  Given the number of bespoke developments we have migrating could be a very painful experience and we don't have the luxury of downtime, the sites have to be available.

I did find a forum thread on LinkedIn that discusses the move.  It seems that there's a tool (STSADM) that will pick up most of the problems you're likely to face.

The thing is, most of the sites in our site collection (including the ones with the most bespoke development) will be getting archived in March/April/May 2011.  If we wait until after this has been done there will be a lot less to go wrong and to fix.  I have recommended that we wait until then.  Yes, 2007 is very out of date but we do not currently have any problems that would be fixed by going to 2010 or a business need for any features added in 2010.  We do have a 2010 site so if a new site came along we could build that on 2010 and if a site developed a need to move to 2010 we could transfer just that site over.

Thursday 9 December 2010

Displaying Server Parameters

My colleague discovered how to display a server variable (e.g. the logged on user) on a page:
  1. Insert a field from any list as a single item dataview, doesn't matter which list or which field, into your page.  We'll say you're using 'Title'
  2. Create a Parameter on that view of Parameter Type 'Server Variable' and set the Server Variable Name to the name of the variable you want to use (e.g. LOGON_VARIABLE for the username of the logged on user.
  3. In the page select the dataview you created then go to the Code view (or code pane in Split view).  look for a line that contains an at symbgol followd by the name of the field you chose.  If you used the title field it would look something like:
    <xsl:value-of select="@Title" />
  4. Replace the @ with a $ and the field name with the name of the parameter.  If the parameter name is Param1 the line will now look like:
    <xsl:value-of select="$Param1" />
  5. Save the page and view it in your browser, it should show your username.