DocSpace-buildtools/common/ASC.ActiveDirectory/ComplexOperations/LdapLocalization.cs

615 lines
17 KiB
C#
Raw Normal View History

2022-05-05 13:23:05 +00:00
// (c) Copyright Ascensio System SIA 2010-2022
//
// This program is a free software product.
// You can redistribute it and/or modify it under the terms
// of the GNU Affero General Public License (AGPL) version 3 as published by the Free Software
// Foundation. In accordance with Section 7(a) of the GNU AGPL its Section 15 shall be amended
// to the effect that Ascensio System SIA expressly excludes the warranty of non-infringement of
// any third-party rights.
//
// This program is distributed WITHOUT ANY WARRANTY, without even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, see
// the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
//
// You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia, EU, LV-1021.
//
// The interactive user interfaces in modified source and object code versions of the Program must
// display Appropriate Legal Notices, as required under Section 5 of the GNU AGPL version 3.
//
// Pursuant to Section 7(b) of the License you must retain the original Product logo when
// distributing the program. Pursuant to Section 7(e) we decline to grant you any rights under
// trademark law for use of our trademarks.
//
// All the Product's GUI elements, including illustrations and icon sets, as well as technical writing
// content are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0
// International. See the License terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
namespace ASC.ActiveDirectory.ComplexOperations;
2022-05-05 13:23:05 +00:00
2022-03-29 12:23:16 +00:00
[Scope]
2022-03-17 19:44:34 +00:00
public class LdapLocalization
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
private ResourceManager _resourceManager;
private ResourceManager _notifyResourceManager;
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public void Init(ResourceManager resourceManager = null, ResourceManager notifyResourceManager = null)
{
_resourceManager = resourceManager;
_notifyResourceManager = notifyResourceManager;
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string FirstName
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "FirstName";
const string def_val = "First Name";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LastName
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LastName";
const string def_val = "Last Name";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsModifyLdapUsers
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsModifyLdapUsers";
const string def_val = "Modifying LDAP users on ordinary portal users";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsTenantQuotaSettled
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsTenantQuotaSettled";
const string def_val = "The current pricing plan user limit has been reached";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorCantCreateUsers
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorCantCreateUsers";
const string def_val = "Users could not be created, the received data are incorrect.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsInternalServerError
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsInternalServerError";
const string def_val = "Server internal error.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusGettingUsersFromLdap
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusGettingUsersFromLdap";
const string def_val = "Retrieving the user list from the LDAP server";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusGivingRights
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusGivingRights";
const string def_val = "Setting user {0} as {1} admin";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorUsersNotFound
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorUsersNotFound";
const string def_val = "No users could be found.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusRemovingOldRights
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusRemovingOldRights";
const string def_val = "Removing outdated access rights that have been loaded via LDAP earlier";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusRemovingOldUsers
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusRemovingOldUsers";
const string def_val = "Removing outdated user profiles that have been loaded via LDAP earlier";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusSavingUserPhoto
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusSavingUserPhoto";
const string def_val = "Saving photo";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusSavingUsers
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusSavingUsers";
const string def_val = "Saving users";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusSyncingUsers
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusSyncingUsers";
const string def_val = "Syncing users";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusRemovingOldGroups
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusRemovingOldGroups";
const string def_val = "Removing outdated groups that have been loaded via LDAP earlier";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusGettingGroupsFromLdap
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusGettingGroupsFromLdap";
const string def_val = "Retrieving the group list from the LDAP server";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorGroupsNotFound
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorGroupsNotFound";
const string def_val = "No groups could be found.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusSavingGroups
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusSavingGroups";
const string def_val = "Saving groups";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorCantGetLdapSettings
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorCantGetLdapSettings";
const string def_val = "The server could not get settings.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusCheckingLdapSettings
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusCheckingLdapSettings";
const string def_val = "Checking LDAP support settings";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusLoadingBaseInfo
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusLoadingBaseInfo";
const string def_val = "Loading LDAP base info";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusCertificateVerification
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusCertificateVerification";
const string def_val = "Certificate verification";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorWrongServerOrPort
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorWrongServerOrPort";
const string def_val =
"Unable to connect to LDAP server. Please check if the server address and port number are correct.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorWrongUserDn
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorWrongUserDN";
const string def_val = "Incorrect User DN.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorIncorrectLdapFilter
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorIncorrectLdapFilter";
const string def_val = "Invalid User Filter value.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorLostRights
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorLostRights";
const string def_val = "You attempted to take away admin rights from yourself. Your admin rights was unaffected.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorRemovedYourself
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorRemovedYourself";
const string def_val = "Your account has been unlinked from LDAP. You may need to set a password for your account because you won't be able to login using LDAP password.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorWrongLoginAttribute
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorWrongLoginAttribute";
const string def_val = "Could not get Login Attribute for one or several users.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorWrongGroupDn
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorWrongGroupDN";
const string def_val = "Incorrect Group DN.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorWrongGroupFilter
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorWrongGroupFilter";
const string def_val = "Could not get Group Attribute for one or several groups.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorWrongGroupAttribute
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorWrongGroupAttribute";
const string def_val = "Could not get User Attribute for one or several users.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorWrongUserAttribute
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorWrongUserAttribute";
const string def_val = "Could not get User Attribute for one or several users.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorWrongGroupNameAttribute
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorWrongGroupNameAttribute";
const string def_val = "Could not obtain Group Name Attribute for one or several groups.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorCredentialsNotValid
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorCredentialsNotValid";
const string def_val = "Incorrect login or password.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsConnectError
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsConnectError";
const string def_val =
"A more secure authentication type is required. Please use encripted connection or enable plain authentication on the server.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStrongAuthRequired
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStrongAuthRequired";
const string def_val =
"A more secure authentication type is required. Please use encripted connection or enable plain authentication on the server.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsWrongSidAttribute
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsWrongSidAttribute";
const string def_val =
"Unique ID for user/group objects could not be obtained. By default the system will try to match one of the following identifiers: entryUUID, nsuniqueid, GUID, objectSid. If none of the attributes corresponds to your LDAP server, please specify the necessary attribute in the ldap.unique.id setting of the web.appsettings.config file.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsTlsNotSupported
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsTlsNotSupported";
const string def_val = "StartTLS not supported for current LDAP server.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorDomainNotFound
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorDomainNotFound";
const string def_val = "LDAP domain not found.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorUnknownError
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorUnknownError";
const string def_val = "Unknown error.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusSavingSettings
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusSavingSettings";
const string def_val = "Saving settings";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsErrorCantSaveLdapSettings
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsErrorCantSaveLdapSettings";
const string def_val = "The server could not save settings.";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string ErrorEmailEmpty
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "ErrorEmailEmpty";
const string def_val = "Email field is empty";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string ErrorAccessDenied
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "ErrorAccessDenied";
const string def_val = "No permissions to perform this action";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusAddingGroupUser
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusAddingGroupUser";
const string def_val = "adding user";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusRemovingGroupUser
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusRemovingGroupUser";
const string def_val = "removing user";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusUpdatingAccessRights
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusUpdatingAccessRights";
const string def_val = "Updating users access rights";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusUpdatingUserPhotos
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusUpdatingUserPhotos";
const string def_val = "Updating user photos";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string LdapSettingsStatusDisconnecting
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "LdapSettingsStatusDisconnecting";
const string def_val = "LDAP disconnecting";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
public string NotifyButtonJoin
{
get
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
const string def_key = "ButtonAccessYourPortal";
const string def_val = "Click here to join the portal";
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
return GetValueOrDefault(def_key, def_val);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
}
2022-03-08 05:37:20 +00:00
2022-03-17 19:44:34 +00:00
private string GetValueOrDefault(string key, string defaultValue)
{
try
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
var val = _resourceManager != null ? _resourceManager.GetString(key) : null;
if (val == null && _notifyResourceManager != null)
2022-03-08 05:37:20 +00:00
{
2022-03-17 19:44:34 +00:00
val = _notifyResourceManager.GetString(key);
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
return val != null ? val : defaultValue;
2022-03-08 05:37:20 +00:00
}
2022-03-17 19:44:34 +00:00
catch
{
//
}
return defaultValue;
2022-03-08 05:37:20 +00:00
}
}