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); } if (!Page.IsPostBack) { // bind the Roles repeater to a dataview with all sections. DataView rolesWithStatistics = SecurityGuiHelper.GetAllRolesWithStatisticsAsDataView(); rpRoles.DataSource = rolesWithStatistics; rpRoles.DataBind(); } }