b5005a26f2d90b9eebd5baf37791284bfc93f64a
Tutorials/CodeSamples/Login-Sample.md
| ... | ... | @@ -41,11 +41,11 @@ void btnLogin_Click(object sender, EventArgs args) |
| 41 | 41 | loginValidator.IsValid = true; |
| 42 | 42 | bool isAdmin; |
| 43 | 43 | if (AuthenticateUser(userNameTextbox.Text, userPassword.Value, out isAdmin)) { |
| 44 | - HttpContext.Current.Session["UserName"] = userNameTextbox.Text; |
|
| 44 | + AdHocSettings.CurrentUserName = userNameTextbox.Text; |
|
| 45 | 45 | if (isAdmin) |
| 46 | - HttpContext.Current.Session["Role"] = "Admin"; |
|
| 46 | + AdHocSettings.CurrentUserRoles = new string[] { "Admin" }; |
|
| 47 | 47 | else |
| 48 | - HttpContext.Current.Session["Role"] = "RegularUser"; |
|
| 48 | + AdHocSettings.CurrentUserRoles = new string[] { "RegularUser" }; |
|
| 49 | 49 | global_asax.CustomAdHocConfig.InitializeReporting(); |
| 50 | 50 | Page.Title = "Izenda - " + Izenda.AdHoc.AdHocSettings.CurrentUserName; |
| 51 | 51 | Response.Redirect("ReportList.aspx"); |