public void ToggleBlueDotMenuVisibility() { if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated && RestHelper.appTokensSet() && !Request.FilePath.Contains("OAuth")) { RestProfile profile = RestProfile.GetRestProfile(); blueDotMenu.Visible = profile.OAuthAccessToken.Length > 0; } else { blueDotMenu.Visible = false; } }
private void loadVisibleSections() { notLoggedIn.Visible = false; notConnected.Visible = false; connected.Visible = false; appTokensNotFound.Visible = false; if (!RestHelper.appTokensSet()) { appTokensNotFound.Visible = true; } else if (!System.Web.HttpContext.Current.User.Identity.IsAuthenticated) { notLoggedIn.Visible = true; } else { notConnected.Visible = RestProfile.GetRestProfile().OAuthAccessToken == ""; connected.Visible = RestProfile.GetRestProfile().OAuthAccessToken != ""; } (this.Master as SiteMaster).ToggleBlueDotMenuVisibility(); }
protected void Page_Load(object sender, EventArgs e) { try { if (!System.Web.HttpContext.Current.User.Identity.IsAuthenticated || !RestHelper.appTokensSet() || RestProfile.GetRestProfile().OAuthAccessToken.Length == 0) { Response.Redirect("~/ManageConnection"); } customersView.DataSource = RestHelper.getCustomerList(RestProfile.GetRestProfile()); customersView.DataBind(); } catch { } }