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 = HnDGeneralUtils.TryConvertToInt(Request.QueryString["RoleID"]); if (!Page.IsPostBack) { // Get Role RoleEntity role = SecurityGuiHelper.GetRole(_roleID); _roleDescription = role.RoleDescription; // bind the users listbox to an entitycollection with all users. UserCollection users = UserGuiHelper.GetAllUsersNotInRole(_roleID); lbxUsers.DataSource = users; lbxUsers.DataTextField = "NickName"; lbxUsers.DataValueField = "UserID"; lbxUsers.DataBind(); } }