Pages

Monday, November 30, 2009

Item Level Security For SharePoint Document Libraries

Hi ,


after some long discussions with my collegues and by observations when I came to know that sharepoint document libraries don't have any UI to provide Item Level Security then I started thinking on this .
all we know that as in Sharepoint list we can set the read and write security by using UI in advanced settings and like this





but in case of SPDocumentLibrary things are in some different way
but I found one way by using custom solution for this
this can be done like:

actually there are some read and write security bits available with the SPList and SPDocumentLibrary.
by setting those with proper valued we can manage ItemLevelSecurity
  • Read Security
    1 - All users have Read access to all items.
    2 - Users have Read access only to items that they create.
  • Write security
    1 — All users can modify all items.
    2 — Users can modify only items that they create.
    4 — Users cannot modify any list item.

more details can be found here Read Security and Write Security

Get SharePoint WebApplication/Application Pool owner's password

Hi All,
I was trying to get the username and the password for the sharepoint webapplication owner.
after long searching in this thing I came up with one short custom solution and this can be done like this:
SPWebApplication webApp = SPContext.Current.Site.WebApplication; string userName =webApp.ApplicationPool.Username;
string password == webApp.ApplicationPool.Password;

this gets the username and password of the Application Pool Creator for web application