/// <summary> /// Page_PreRender /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_PreRender(object sender, EventArgs e) { // Fill in the user details. string fullName = GetUserDetails(); // Set the breadcrumb list. BuildBreadCrumbList(fullName); // Fill in the policy information. if (!Policy.GetUserPolicies()) { TopNav.ShowInfo(String.Format("{0} - {1}", GetString("SERVERSTATUSDOWN"), GetString("MINIMALINFO"))); } // Get the iFolders. GetiFolders(false); }
private bool UpdateProxyUserInfo(string ldapAdmin, string ldapAdminPwd, string proxyDN, string ProxyDNPwd) { bool status = true; try { iFolderServer[] list = web.GetServers(); foreach (iFolderServer server in list) { //check all servers other than current server. if (server.ID != ServerID) { log.Info("Connecting to {0}", server.ID); remoteweb = new iFolderAdmin(); remoteweb.PreAuthenticate = true; remoteweb.Credentials = web.Credentials; remoteweb.Url = server.PublicUrl + "/iFolderAdmin.asmx"; remoteweb.GetAuthenticatedUser(); //Pick information from IdentityProvider LdapInfo ldapInfo = remoteweb.GetLdapDetails(); log.Info("Proxy User = {0} on {1}", ldapInfo.ProxyDN, server.ID); if (proxyDN == ldapInfo.ProxyDN) { //ldapInfo.ProxyDN = ProxyDN; ldapInfo.ProxyPassword = ProxyDNPwd; log.Info("Changing proxy user password on : {0}", server.ID); remoteweb.SetLdapDetails(ldapInfo, ldapAdmin, ldapAdminPwd, server.ID); } } } } catch (Exception ex) { status = false; log.Info("Exception in UpdateProxyUserInfo : (0)", ex.Message); TopNav.ShowInfo(String.Format(GetString("ALLSERVERPROXYPASSWORDCHANGEERROR"))); return(status); } return(status); }
/// <summary> /// Event that gets called when the save button is clicked. /// </summary> /// <param name="source"></param> /// <param name="e"></param> protected void OnSaveButton_Click(object source, EventArgs e) { iFolderSystem system = new iFolderSystem(); system.Name = Name.Text; system.Description = Description.Value; if (FullNameSetting.SelectedIndex == 0) { system.UsersFullNameDisplay = "FirstNameLastName"; } else { system.UsersFullNameDisplay = "LastNameFirstName"; } if (GroupQuotaRestriction.SelectedIndex == 0) { system.GroupQuotaRestrictionMethod = (int)QuotaRestriction.UI_Based; } else if (GroupQuotaRestriction.SelectedIndex == 1) { system.GroupQuotaRestrictionMethod = (int)QuotaRestriction.Sync_Based; } if (GroupSegregated.Checked == true) { system.GroupSegregated = "yes"; } else { system.GroupSegregated = "no"; } ConnectToMaster(); web.SetSystem(system); // To Set SSL option connect to local server, not master web.Url = currentServerURL; iFolderServer[] list = web.GetServers(); foreach (iFolderServer server in list) { if (server.IsLocal) { UriBuilder remoteurl = new UriBuilder(server.PublicUrl); remoteurl.Path = (new Uri(web.Url)).PathAndQuery; web.Url = remoteurl.Uri.ToString(); int SelectedIndex = 0; SaveButton.Enabled = CancelButton.Enabled = false; if (IsSSLOptionChanged == "true") { SelectedIndex = SSLValue.SelectedIndex; string SelectedValue = "both"; bool SSLUpdated = false; switch (SelectedIndex) { case 0: // SSL SelectedValue = "ssl"; break; case 1: // NONSSL SelectedValue = "nonssl"; break; case 2: // BOTH default: SelectedValue = "both"; break; } SSLUpdated = web.SetSimiasSSLStatus(SelectedValue); IsSSLOptionChanged = "false"; // Now connect back to master if (!server.IsMaster) { ConnectToMaster(); } if (SSLUpdated == true) { // restart server message TopNav.ShowInfo(GetString("RESTARTSERVER")); return; } else { // updation of ssl failed message TopNav.ShowInfo(GetString("UNKNOWNERROR")); return; } } } } GetSystemInformation(); }