private void Page_Load(object sender, System.EventArgs e) { // If the user doesn't have any access rights to management stuff, the user should // be redirected to the default of the global system. if (!SessionAdapter.HasSystemActionRights()) { // doesn't have system rights. redirect. Response.Redirect("../Default.aspx", true); } // Check if the user has the right systemright if (!SessionAdapter.HasSystemActionRight(ActionRights.SecurityManagement)) { // no, redirect to admin default page, since the user HAS access to the admin menu. Response.Redirect("Default.aspx", true); } _roleID = 0; if (!Page.IsPostBack) { // Get all roles RoleCollection roles = SecurityGuiHelper.GetAllRoles(); cbxRoles.DataSource = roles; cbxRoles.DataTextField = "RoleDescription"; cbxRoles.DataValueField = "RoleID"; cbxRoles.DataBind(); if (cbxRoles.Items.Count > 0) { cbxRoles.Items[0].Selected = true; _roleID = HnDGeneralUtils.TryConvertToInt(cbxRoles.SelectedItem.Value); } // get the audit actions AuditActionCollection auditActions = SecurityGuiHelper.GetAllAuditActions(); cblAuditActions.DataSource = auditActions; cblAuditActions.DataTextField = "AuditActionDescription"; cblAuditActions.DataValueField = "AuditActionID"; cblAuditActions.DataBind(); // Reflect action rights for current selected forum for this role ReflectCurrentAuditActions(); } else { _roleID = HnDGeneralUtils.TryConvertToInt(cbxRoles.SelectedItem.Value); } }