views:

41

answers:

3

Hi,

This is about folder level permissions. We have a document library with break inheritance. While adding folders, sub folders through code, again we coded for break inheritance. Now the requirement is, when a user/group is added to subfolder permission list, we need to track this event. Which sharepoint event do we use and on what level. Please help.

+1  A: 

You can get this information from the Audit log providing auditing is enabled on the List / Site.

MOSS comes with some basic audit reports. Have a look at this resource on Office Online for more details.

Alternatively, have a look at our SharePoint Audit Suite. It is cheap and does exactly what you are after.

I worked on the product so I am obviously biased :-)

Muhimbi
Hey, thanks for the reply but I have a specific requirement to call custom code when a user is added to folder permissions. So I need to catch that event and call my code. Please reply.
Sushant
A: 

Basically, it can't be done. You need to make sure whatever user/process is setting those permissions is doing it through code written by you, so you can call your custom code from there.

See http://stackoverflow.com/questions/90764/sharepoint-event-when-permissions-of-listitems-have-been-changed .

Paul-Jan
A: 

Hi all,

I have reached a solution for my problem(bit compromising though). I wanted to achieve this in one document library only. I will explain the process here.

The permissions page is always "user.aspx" and add new permissions page is "aclinv.aspx".

I implemented an httpmodule url listener for "aclinv.aspx". So when this page is requested, I transfer it my custom permissions page. Interestingly, url's in sharepoint are the key to every operation. It had my folder name in url as an id, the document library name also an id.

The custom permissions page is exactly similar to "aclinv.aspx" except the fact that the application is listening for this page. When user is selected with proper permissions on this page, the application tracks the userid, selected permission, folder id, document library id everything through the url and the flow remains the same.

Thats it, job done. With all these values, the application can do whatever it wnats to the new request.

Thanks a lot to all for your guidance. It really helped a lot.

PS. If there is a better way to do this, I would be glad to know.

Sushant

Sushant