SPUtility.EnsureSiteAdminAccess method
SharePoint 2013
Determines whether the current user is a site administrator on the specified site and, if not, requests a user name and password, and then opens the Error page for an “access denied” exception so that the user must request access to the site or list from the owner.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.PerSpec)] public static void EnsureSiteAdminAccess( SPWeb web )
Parameters
- web
- Type: Microsoft.SharePoint.SPWeb
An Microsoft.SharePoint.SPWeb object that represents the site.