addition of part of functionality of security groups for organization users
This commit is contained in:
parent
b6d03a3ecb
commit
53dc8efa5d
37 changed files with 3235 additions and 6 deletions
|
@ -44,6 +44,35 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
return de;
|
||||
}
|
||||
|
||||
public static string[] GetUsersGroup(string group)
|
||||
{
|
||||
List<string> rets = new List<string>();
|
||||
|
||||
DirectorySearcher deSearch = new DirectorySearcher
|
||||
{
|
||||
Filter =
|
||||
("(&(objectClass=user))")
|
||||
};
|
||||
|
||||
SearchResultCollection srcUsers = deSearch.FindAll();
|
||||
|
||||
foreach (SearchResult srcUser in srcUsers)
|
||||
{
|
||||
DirectoryEntry de = srcUser.GetDirectoryEntry();
|
||||
PropertyValueCollection props = de.Properties["memberOf"];
|
||||
|
||||
foreach (string str in props)
|
||||
{
|
||||
if (str.IndexOf(group) != -1)
|
||||
{
|
||||
rets.Add(de.Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rets.ToArray();
|
||||
}
|
||||
|
||||
public static bool IsUserInGroup(string samAccountName, string group)
|
||||
{
|
||||
bool res = false;
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
OrganizationUser GetUserGeneralSettings(string loginName, string organizationId);
|
||||
|
||||
OrganizationSecurityGroup GetSecurityGroupGeneralSettings(string groupName, string organizationId);
|
||||
|
||||
void SetUserGeneralSettings(string organizationId, string accountName, string displayName, string password,
|
||||
bool hideFromAddressBook, bool disabled, bool locked, string firstName, string initials,
|
||||
string lastName,
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebsitePanel.Providers.HostedSolution
|
||||
{
|
||||
public class OrganizationSecurityGroup
|
||||
{
|
||||
public string DisplayName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string AccountName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public OrganizationUser[] MembersAccounts
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public OrganizationUser ManagerAccount
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Notes
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string SAMAccountName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -101,6 +101,7 @@
|
|||
<Compile Include="HostedSolution\LyncUserPlanType.cs" />
|
||||
<Compile Include="HostedSolution\LyncUsersPaged.cs" />
|
||||
<Compile Include="HostedSolution\LyncVoicePolicyType.cs" />
|
||||
<Compile Include="HostedSolution\OrganizationSecurityGroup.cs" />
|
||||
<Compile Include="HostedSolution\TransactionAction.cs" />
|
||||
<Compile Include="ResultObjects\HeliconApe.cs" />
|
||||
<Compile Include="HostedSolution\ExchangeMobileDevice.cs" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue