Current Path : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/cdpp3/App_Code/BL/ |
Windows NT SG2NWVPWEB022 10.0 build 17763 (Windows Server 2016) i586 |
Current File : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/cdpp3/App_Code/BL/BasePage.vb |
Imports Microsoft.VisualBasic 'Imports OrmLib 'Imports IventuresBiz Partial Public Class BasePage Inherits System.Web.UI.Page ' Dim LoggedUser As BLL.IVUser Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init If Not Context.User.Identity.IsAuthenticated Then Response.Redirect(FormsAuthentication.LoginUrl) End If If Not IsPostBack Then ' LoggedUser = CType(HttpContext.Current.User, BLL.IVUser) Dim murl As String = Request.Url.Segments(Request.Url.Segments.Length - 1) If Not ValidUrlRequest(murl) Then Response.Redirect(FormsAuthentication.DefaultUrl, True) End If End If End Sub Private Function ValidUrlRequest(ByVal url As String) As Boolean 'Dim om As New DataManager(Config.Dsn) 'Try ' om.QueryCriteria.Clear() ' om.QueryCriteria.And(JoinPath.Menu.Columns.M_URL, url, MatchType.Exact) ' Dim mn As IventuresBiz.Menu = om.GetMenu ' If Not IsNothing(mn) Then ' If Not mn.M_UT_ID.Contains("|" & LoggedUser.Role & "|") Then ' Return False ' End If ' End If ' Return True 'Finally ' om = Nothing 'End Try End Function End Class