Showing posts with label Permission. Show all posts
Showing posts with label Permission. Show all posts

Monday, August 25, 2008

Find Permission and perform action based on Admin access

Find Permission
SPWeb thisweb = SPControl.GetContextWeb(Context);
isAdmin = thisweb.DoesUserHavePermissions(SPBasePermissions.ManageLists);
if (isAdmin == true)
{
// todo
}

Monday, August 11, 2008

Permission for SPSecurityTrimmedControl

you can use SPSecurityTrimmedControl to customize as per the security.

'<' SharePoint:SPSecurityTrimmedControl PermissionsString="AddAndCustomizePages, ManageLists" runat="server"'>'

'<'/SharePoint:SPSecurityTrimmedControl'>'

The content within the control will be shown based on users access level.

The permission are like..
AddListItems
EditListItems
DeleteListItems
ViewListItems
ApproveItems
OpenItems
Zac Smith has listed all of them here

Monday, August 4, 2008

Failed to verify user permissions" error when using DspSts.asmx web service

have u enabled anonymous access at web application level?

more here