serving the solutions day and night

Pages

Wednesday, December 29, 2010

Check SharePoint user & their permissions

Below is the some methods to check user and their permissions levels are

SPSite.CheckPermissions
SPSite.DoesUserHavePermissions

SPWeb.CheckPermissions
SPWeb.DoesUserHavePermissions

SPList.CheckPermissions
SPList.DoesUserHavePermissions

SPListItem.CheckPermissions
SPListItem.DoesUserHavePermissions

Tuesday, December 28, 2010

Generate SharePoint People(Users),Groups & Permissions List

C# code will generate users, groups and permissions list from site collection web sites. It means the code will get all people, groups and their role information from People and Group pages for each web site in a single report instead of browsing each pages.
  1. Create siterole.aspx, copy the following code in it.
  2. Paste the siterole.aspx file in the c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS directory.
  3. Browse the page http://{your URL NAME}/{site NAME}/_layouts/siterole.aspx and view the report.

Monday, December 27, 2010

Publish & Add Web Part an Excel Spreadsheet in SharePoint

Add a trusted file location
  1. Go to 'Central Administration' home page -> click 'Application Management' tab -> in the 'Office SharePoint Server Shared Services' section, click 'Create or configure this farm's shared services', You're in the 'Manage this Farm's Shared Services' Page.

  2. Click 'SharedServices1(Default)', it takes to the 'Shared Services Administration: SharedServices1' home page, in the 'Excel Services Settings' section, select 'Trusted file locations' and click 'Add Trusted File Location'.