示例#1
0
 ///<summary>Sets the static time and ACL properties.</summary>
 protected override void OnInit(System.EventArgs e)
 {
     if (ServicePath.Substring(0, 1) == "/")
     {
         string Port   = Page.Request.ServerVariables["SERVER_PORT"];
         string Server =
             (Page.Request.IsSecureConnection) ?
             ("http://" + Page.Request.ServerVariables["SERVER_NAME"] + ((Port != "" && Port != "443") ? (":" + Port) : "")) :
             ("http://" + Page.Request.ServerVariables["SERVER_NAME"] + ((Port != "" && Port != "80") ? (":" + Port) : ""));
         ServicePath = Server + ServicePath;
     }
     if (UnauthorizedUrl == "" && ServicePath != "")
     {
         UnauthorizedUrl = NavClient.UnauthorizedUrl();
     }
     if (URL_ACL == null && ConnectionString == "" && ServicePath != "")
     {
         URL_ACL = NavClient.ACL();
     }
     OnInit(Page.Request.ApplicationPath);
     //CHG0131014 - OTSP/SUBRO/PRB0047380/SECURITY FIXES - Remove additional logs
     //AppLogger.Logger.Log("Redirect url:" + Page.Request.ServerVariables["SCRIPT_NAME"].ToLower());
     //AppLogger.Logger.Log("User Name:" + Page.User.Identity.Name);
     //CHG0131014 - OTSP/SUBRO/PRB0047380/SECURITY FIXES - Remove additional logs
     if (Auto && !CheckAccess(Page.Request.ServerVariables["SCRIPT_NAME"].ToLower(), Page.User))
     {
         AppLogger.Logger.Log("Page not authorized, redirecting to UnauthorizedUrl");
         Page.Response.Redirect(UnauthorizedUrl);
     }
     Visible = false;
     if (typeof(CSAAWeb.WebControls.PageTemplate).IsInstanceOfType(Page))
     {
         ((CSAAWeb.WebControls.PageTemplate)Page).NavACL = this;
     }
 }