try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPWeb currentWeb = SPContext.Current.Web;
if (currentWeb.CurrentUser.IsSiteAdmin)
{
writer.Write("Logged User is Having Admin Permissions to the Site...!");
}
});
}
catch (Exception ex)
{
writer.Write(ex.ToString());
}
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
SPWeb currentWeb = SPContext.Current.Web;
if (currentWeb.CurrentUser.IsSiteAdmin)
{
writer.Write("Logged User is Having Admin Permissions to the Site...!");
}
});
}
catch (Exception ex)
{
writer.Write(ex.ToString());
}
No comments:
Post a Comment