Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a list with a bunch of folders in the root (one for each department to be exact). Each department also has its own SharePoint group containing the names of the respective employees in that department. So far so good :)

What I want is to be able to limit users from each department to view, edit and delete items from WITHIN their single, specific folder ONLY. In other words, when people from IT navigate to the list, they should only see the IT folder (no "add new item link") and should only be able to add items under this folder.

How do I set this up programmatically?

FYI: I've already tried breaking inheritance on each folder (and opting NOT to copy the existing role assignments) then manually granting each department's SharePoint group "Contributor" access to their corresponding folder. But... what this really does is the following:

  • It allows only members from IT to see the IT folder **good**
  • It allows members from the IT group to edit the name of the IT folder **bad**
  • It does NOT allow members from IT to add items under the IT folder **bad**
  • It does NOT allow members from IT to add items at the root **good**
share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

OK so there's a few aspects to this...

First of all, it isn't entirely correct to say that IT members CANNOT add items to their folder. In fact they can, however the 'Add New Item' link is not displayed. You would instead have to go to Items on the Ribbon and Select 'New Item'. You may notice that this is not available outside of their folder.

To prevent editing of the Folder name, you would need to create an Event handler that when run on that list with the item being a folder, to either ignore the change or return an error/redirect the user. (Note that i would put an added check in here for members of the administrators group or something similar so that it CAN be changed by someone)

If you wanted to display the Add New Item link, I would imagine a not terribly insane means to do so would involve adding javascript/jquery to the list display page that would hide it for the root folder, and do nothing otherwise. In order to properly implement this an event handler would need to be added in order to Result in an error message if someone were to try and add an item to the root folder (the New Item button would still be available as you would need users to have at least the add item permission on the root)

So.. let me know what is appropriate for you and if you need code samples to get started and i would be happy to supply some.

share|improve this answer
    
Thanks for your comments Zork. I ended up using an event receiver as suggested to prevent users from adding items to the list's root folder and editing the folder names directly. Another thing I realised that I had to do was grant EVERY department group "contribute" rights on the entire list (i.e. not just their single folder) as this is what allows them to add items to the list period. So i'm 90% of the way there... All I need to do is find out a way to hide the "add new item" link for ALL users in the root folder. Any ideas here? –  Nick Larter Jun 11 '12 at 5:32
    
techtrainingnotes.blogspot.com/2010/08/… this link should get you started –  Zork Jun 11 '12 at 13:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.