DocSpace-client/common/ASC.ActiveDirectory/ComplexOperations/Data/LdapChangeEnums.cs

63 lines
1.7 KiB
C#
Raw Normal View History

2022-03-14 18:58:06 +00:00
/*
*
* (c) Copyright Ascensio System Limited 2010-2021
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
2022-03-17 19:44:34 +00:00
namespace ASC.ActiveDirectory.ComplexOperations.Data;
public enum LdapChangeType
2022-03-14 18:58:06 +00:00
{
2022-03-17 19:44:34 +00:00
User,
Group
}
2022-03-14 18:58:06 +00:00
2022-03-17 19:44:34 +00:00
public enum LdapItemChangeKey
{
Sid,
Name,
FirstName,
LastName,
Mail,
Phone,
Title,
Location,
Member
}
2022-03-14 18:58:06 +00:00
2022-03-17 19:44:34 +00:00
public enum LdapChangeAction
{
None,
Skip,
Add,
AddMember,
Merge,
Update,
Remove,
RemoveMember,
SaveAsPortal
}
2022-03-14 18:58:06 +00:00
2022-03-17 19:44:34 +00:00
public static class LdapUserMapping
{
public static readonly List<string> Fields = new List<string>
2022-03-14 18:58:06 +00:00
{
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.FirstName),
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.LastName),
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Mail),
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Phone),
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Title),
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Location),
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Sid),
Enum.GetName(typeof(LdapItemChangeKey), LdapItemChangeKey.Member)
};
}