ettings["AdminUser"];
if ( currentUser == adminUser )
{
// Current user is an administrator. Administrator is Owner for all submissions.
return true;
}
if ( userId != null && userId.ToString() == currentUser )
{
// Current user is same as the userId passed.
return true;
}
return false;
}
/**//// <summary>
/// This method checks if the passed user id is an adinistrator or if this is same as current user.
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public static bool IsAdministrator()
{
if ( System.Web.HttpContext.Current.Session["CurrentUser"] == null )
{
// There is no userid saved in session. This means user has not logged in.
return false;
}
// Get current user from session.