diff --git a/DDUserManager/DDUserManager/App.config b/DDUserManager/DDUserManager/App.config
index 9d507d7..8005d0b 100644
--- a/DDUserManager/DDUserManager/App.config
+++ b/DDUserManager/DDUserManager/App.config
@@ -1,11 +1,33 @@
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+ (&(objectClass=group) (samAccountName=*))
+
+
+
diff --git a/DDUserManager/DDUserManager/ClassActiveDirectory.vb b/DDUserManager/DDUserManager/ClassActiveDirectory.vb
index f314f76..c40d721 100644
--- a/DDUserManager/DDUserManager/ClassActiveDirectory.vb
+++ b/DDUserManager/DDUserManager/ClassActiveDirectory.vb
@@ -49,6 +49,20 @@ Public Class ClassActiveDirectory
"Zulässige"
}
+ Public Class GroupResult
+ Public SAMAccountName As String
+ Public ObjectClass As String
+ Public CN As String
+ Public Description As String
+ Public DistinguishedName As String
+ Public Name As String
+ Public ObjectCategory As String
+
+ Public Overrides Function ToString() As String
+ Return $"SAMAccountName={SAMAccountName}, ObjectClass={ObjectClass}, CN={CN}, Description={Description}, DistinguishedName={DistinguishedName}, Name={Name}, ObjectCategory={ObjectCategory}"
+ End Function
+ End Class
+
Public Shared Function ConnectionTest(path As String)
Try
Dim de As New DirectoryEntry(path)
@@ -80,28 +94,81 @@ Public Class ClassActiveDirectory
Return dirSearcher
End Function
- Public Shared Function GetActiveDirectoryGroups() As List(Of String)
- Dim groups As New List(Of String)
+ Public Shared Function GetActiveDirectoryGroups(Optional query As String = "(&(objectClass=group) (samAccountName=*))") As List(Of GroupResult)
+ Dim groups As New List(Of GroupResult)
Dim deSearch = GetDirectorySearch(GetDirectoryEntry())
- deSearch.Filter = "(&(objectClass=group) (samAccountName=" & "*" & "))"
+ deSearch.SearchScope = SearchScope.Subtree
+ deSearch.Filter = query
+ deSearch.SizeLimit = 50000
+
Dim results As SearchResultCollection = deSearch.FindAll()
For Each r As SearchResult In results
Try
- 'Dim groupName = r.GetDirectoryEntry.Name.Replace("CN=", "")
- Dim groupName = r.Properties.Item("samaccountname").Item(0)
+ Dim groupName, objectClass, cn, description, distinguishedName, name, objectCategory As String
+ Try
+ groupName = r.Properties.Item("samaccountname").Item(0)
+ Catch ex As Exception
+ logger.Error(ex)
+ groupName = ""
+ End Try
+ Try
+ objectClass = r.Properties.Item("objectClass").Item(0)
+ Catch ex As Exception
+ logger.Error(ex)
+ objectClass = ""
+ End Try
+ Try
+ cn = r.Properties.Item("cn").Item(0)
+ Catch ex As Exception
+ logger.Error(ex)
+ cn = ""
+ End Try
+ Try
+ description = r.Properties.Item("description").Item(0)
+ Catch ex As Exception
+ logger.Error(ex)
+ description = ""
+ End Try
+ Try
+ distinguishedName = r.Properties.Item("distinguishedName").Item(0)
+ Catch ex As Exception
+ logger.Error(ex)
+ distinguishedName = ""
+ End Try
+ Try
+ name = r.Properties.Item("name").Item(0)
+ Catch ex As Exception
+ logger.Error(ex)
+ name = ""
+ End Try
+ Try
+ objectCategory = r.Properties.Item("objectCategory").Item(0)
+ Catch ex As Exception
+ logger.Error(ex)
+ objectCategory = ""
+ End Try
- If Not IsNothing(groupName) Then
+ If Not String.IsNullOrEmpty(groupName) Then
Dim isExcluded = excludedGroupNames.Where(Function(excludedGroup)
Return (groupName.Contains(excludedGroup) Or groupName.StartsWith(excludedGroup))
End Function).Any()
If Not isExcluded Then
- groups.Add(groupName)
+ groups.Add(New GroupResult() With {
+ .SAMAccountName = groupName,
+ .CN = cn,
+ .Description = description,
+ .DistinguishedName = distinguishedName,
+ .Name = name,
+ .ObjectCategory = objectCategory,
+ .ObjectClass = objectClass
+ })
End If
End If
Catch ex As Exception
- MsgBox("Error while fetching Active Directory groups", MsgBoxStyle.Critical)
+ 'MsgBox("Error while fetching Active Directory groups", MsgBoxStyle.Critical)
+ logger.Error(ex)
End Try
Next
diff --git a/DDUserManager/DDUserManager/DDUserManager.vbproj b/DDUserManager/DDUserManager/DDUserManager.vbproj
index 05a21a4..07125f3 100644
--- a/DDUserManager/DDUserManager/DDUserManager.vbproj
+++ b/DDUserManager/DDUserManager/DDUserManager.vbproj
@@ -105,6 +105,12 @@
True
DS_ChangeS.xsd
+
+ frmADDebug.vb
+
+
+ Form
+
frmConfigDatabase.vb
@@ -156,6 +162,9 @@
+
+ frmADDebug.vb
+
frmConfigDatabase.vb
diff --git a/DDUserManager/DDUserManager/DS_ChangeS.xsd b/DDUserManager/DDUserManager/DS_ChangeS.xsd
index 2a3e825..83bf3e4 100644
--- a/DDUserManager/DDUserManager/DS_ChangeS.xsd
+++ b/DDUserManager/DDUserManager/DS_ChangeS.xsd
@@ -200,7 +200,7 @@ VALUES (@NAME,@ADDED_WHO,@ECM_FK_ID,@AD_SYNC,@INTERNAL,@ACTIVE)
-
+
diff --git a/DDUserManager/DDUserManager/My Project/Settings.Designer.vb b/DDUserManager/DDUserManager/My Project/Settings.Designer.vb
index 181bb45..8fb2a52 100644
--- a/DDUserManager/DDUserManager/My Project/Settings.Designer.vb
+++ b/DDUserManager/DDUserManager/My Project/Settings.Designer.vb
@@ -15,7 +15,7 @@ Option Explicit On
Namespace My
_
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
@@ -64,6 +64,27 @@ Namespace My
Return CType(Me("DD_ECMConnectionString"),String)
End Get
End Property
+
+ _
+ Public ReadOnly Property AD_GROUP_QUERY() As String
+ Get
+ Return CType(Me("AD_GROUP_QUERY"),String)
+ End Get
+ End Property
+
+ _
+ Public Property AD_USER_QUERY() As String
+ Get
+ Return CType(Me("AD_USER_QUERY"),String)
+ End Get
+ Set
+ Me("AD_USER_QUERY") = value
+ End Set
+ End Property
End Class
End Namespace
diff --git a/DDUserManager/DDUserManager/My Project/Settings.settings b/DDUserManager/DDUserManager/My Project/Settings.settings
index 8ca5281..494437e 100644
--- a/DDUserManager/DDUserManager/My Project/Settings.settings
+++ b/DDUserManager/DDUserManager/My Project/Settings.settings
@@ -10,5 +10,11 @@
</SerializableConnectionString>
Data Source=172.24.12.41\tests;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd
+
+ (&(objectClass=group) (samAccountName=*))
+
+
+
+
\ No newline at end of file
diff --git a/DDUserManager/DDUserManager/UserDataSet.Designer.vb b/DDUserManager/DDUserManager/UserDataSet.Designer.vb
index 189608b..b02e954 100644
--- a/DDUserManager/DDUserManager/UserDataSet.Designer.vb
+++ b/DDUserManager/DDUserManager/UserDataSet.Designer.vb
@@ -47,6 +47,8 @@ Partial Public Class UserDataSet
Private tableTBLOCAL_ADGROUPS As TBLOCAL_ADGROUPSDataTable
+ Private tableTBLOCAL_DEBUG_GROUPS As TBLOCAL_DEBUG_GROUPSDataTable
+
Private relationFK_TBDD_USER_MODULES_MODULE_ID As Global.System.Data.DataRelation
Private relationFK_TBDD_CLIENT_USER_GROUP_ID As Global.System.Data.DataRelation
@@ -129,6 +131,9 @@ Partial Public Class UserDataSet
If (Not (ds.Tables("TBLOCAL_ADGROUPS")) Is Nothing) Then
MyBase.Tables.Add(New TBLOCAL_ADGROUPSDataTable(ds.Tables("TBLOCAL_ADGROUPS")))
End If
+ If (Not (ds.Tables("TBLOCAL_DEBUG_GROUPS")) Is Nothing) Then
+ MyBase.Tables.Add(New TBLOCAL_DEBUG_GROUPSDataTable(ds.Tables("TBLOCAL_DEBUG_GROUPS")))
+ End If
Me.DataSetName = ds.DataSetName
Me.Prefix = ds.Prefix
Me.Namespace = ds.Namespace
@@ -256,6 +261,16 @@ Partial Public Class UserDataSet
End Get
End Property
+ _
+ Public ReadOnly Property TBLOCAL_DEBUG_GROUPS() As TBLOCAL_DEBUG_GROUPSDataTable
+ Get
+ Return Me.tableTBLOCAL_DEBUG_GROUPS
+ End Get
+ End Property
+
_
+ Private Function ShouldSerializeTBLOCAL_DEBUG_GROUPS() As Boolean
+ Return false
+ End Function
+
_
Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
@@ -675,6 +707,9 @@ Partial Public Class UserDataSet
_
Public Delegate Sub TBLOCAL_ADGROUPSRowChangeEventHandler(ByVal sender As Object, ByVal e As TBLOCAL_ADGROUPSRowChangeEvent)
+ _
+ Public Delegate Sub TBLOCAL_DEBUG_GROUPSRowChangeEventHandler(ByVal sender As Object, ByVal e As TBLOCAL_DEBUG_GROUPSRowChangeEvent)
+
'''
'''Represents the strongly named DataTable class.
'''
@@ -4822,6 +4857,336 @@ Partial Public Class UserDataSet
End Function
End Class
+ '''
+ '''Represents the strongly named DataTable class.
+ '''
+ _
+ Partial Public Class TBLOCAL_DEBUG_GROUPSDataTable
+ Inherits Global.System.Data.TypedTableBase(Of TBLOCAL_DEBUG_GROUPSRow)
+
+ Private columnSAMACCOUNTNAME As Global.System.Data.DataColumn
+
+ Private columnCN As Global.System.Data.DataColumn
+
+ Private columnOBJECT_CLASS As Global.System.Data.DataColumn
+
+ Private columnOBJECT_CATEGORY As Global.System.Data.DataColumn
+
+ Private columnDESCRIPTION As Global.System.Data.DataColumn
+
+ Private columnDISTINGUISHED_NAME As Global.System.Data.DataColumn
+
+ Private columnNAME As Global.System.Data.DataColumn
+
+ _
+ Public Sub New()
+ MyBase.New
+ Me.TableName = "TBLOCAL_DEBUG_GROUPS"
+ Me.BeginInit
+ Me.InitClass
+ Me.EndInit
+ End Sub
+
+ _
+ Friend Sub New(ByVal table As Global.System.Data.DataTable)
+ MyBase.New
+ Me.TableName = table.TableName
+ If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
+ Me.CaseSensitive = table.CaseSensitive
+ End If
+ If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
+ Me.Locale = table.Locale
+ End If
+ If (table.Namespace <> table.DataSet.Namespace) Then
+ Me.Namespace = table.Namespace
+ End If
+ Me.Prefix = table.Prefix
+ Me.MinimumCapacity = table.MinimumCapacity
+ End Sub
+
+ _
+ Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
+ MyBase.New(info, context)
+ Me.InitVars
+ End Sub
+
+ _
+ Public ReadOnly Property SAMACCOUNTNAMEColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnSAMACCOUNTNAME
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property CNColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnCN
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property OBJECT_CLASSColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnOBJECT_CLASS
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property OBJECT_CATEGORYColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnOBJECT_CATEGORY
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property DESCRIPTIONColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnDESCRIPTION
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property DISTINGUISHED_NAMEColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnDISTINGUISHED_NAME
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property NAMEColumn() As Global.System.Data.DataColumn
+ Get
+ Return Me.columnNAME
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Count() As Integer
+ Get
+ Return Me.Rows.Count
+ End Get
+ End Property
+
+ _
+ Public Default ReadOnly Property Item(ByVal index As Integer) As TBLOCAL_DEBUG_GROUPSRow
+ Get
+ Return CType(Me.Rows(index),TBLOCAL_DEBUG_GROUPSRow)
+ End Get
+ End Property
+
+ _
+ Public Event TBLOCAL_DEBUG_GROUPSRowChanging As TBLOCAL_DEBUG_GROUPSRowChangeEventHandler
+
+ _
+ Public Event TBLOCAL_DEBUG_GROUPSRowChanged As TBLOCAL_DEBUG_GROUPSRowChangeEventHandler
+
+ _
+ Public Event TBLOCAL_DEBUG_GROUPSRowDeleting As TBLOCAL_DEBUG_GROUPSRowChangeEventHandler
+
+ _
+ Public Event TBLOCAL_DEBUG_GROUPSRowDeleted As TBLOCAL_DEBUG_GROUPSRowChangeEventHandler
+
+ _
+ Public Overloads Sub AddTBLOCAL_DEBUG_GROUPSRow(ByVal row As TBLOCAL_DEBUG_GROUPSRow)
+ Me.Rows.Add(row)
+ End Sub
+
+ _
+ Public Overloads Function AddTBLOCAL_DEBUG_GROUPSRow(ByVal SAMACCOUNTNAME As String, ByVal CN As String, ByVal OBJECT_CLASS As String, ByVal OBJECT_CATEGORY As String, ByVal DESCRIPTION As String, ByVal DISTINGUISHED_NAME As String, ByVal NAME As String) As TBLOCAL_DEBUG_GROUPSRow
+ Dim rowTBLOCAL_DEBUG_GROUPSRow As TBLOCAL_DEBUG_GROUPSRow = CType(Me.NewRow,TBLOCAL_DEBUG_GROUPSRow)
+ Dim columnValuesArray() As Object = New Object() {SAMACCOUNTNAME, CN, OBJECT_CLASS, OBJECT_CATEGORY, DESCRIPTION, DISTINGUISHED_NAME, NAME}
+ rowTBLOCAL_DEBUG_GROUPSRow.ItemArray = columnValuesArray
+ Me.Rows.Add(rowTBLOCAL_DEBUG_GROUPSRow)
+ Return rowTBLOCAL_DEBUG_GROUPSRow
+ End Function
+
+ _
+ Public Overrides Function Clone() As Global.System.Data.DataTable
+ Dim cln As TBLOCAL_DEBUG_GROUPSDataTable = CType(MyBase.Clone,TBLOCAL_DEBUG_GROUPSDataTable)
+ cln.InitVars
+ Return cln
+ End Function
+
+ _
+ Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
+ Return New TBLOCAL_DEBUG_GROUPSDataTable()
+ End Function
+
+ _
+ Friend Sub InitVars()
+ Me.columnSAMACCOUNTNAME = MyBase.Columns("SAMACCOUNTNAME")
+ Me.columnCN = MyBase.Columns("CN")
+ Me.columnOBJECT_CLASS = MyBase.Columns("OBJECT_CLASS")
+ Me.columnOBJECT_CATEGORY = MyBase.Columns("OBJECT_CATEGORY")
+ Me.columnDESCRIPTION = MyBase.Columns("DESCRIPTION")
+ Me.columnDISTINGUISHED_NAME = MyBase.Columns("DISTINGUISHED_NAME")
+ Me.columnNAME = MyBase.Columns("NAME")
+ End Sub
+
+ _
+ Private Sub InitClass()
+ Me.columnSAMACCOUNTNAME = New Global.System.Data.DataColumn("SAMACCOUNTNAME", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnSAMACCOUNTNAME)
+ Me.columnCN = New Global.System.Data.DataColumn("CN", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnCN)
+ Me.columnOBJECT_CLASS = New Global.System.Data.DataColumn("OBJECT_CLASS", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnOBJECT_CLASS)
+ Me.columnOBJECT_CATEGORY = New Global.System.Data.DataColumn("OBJECT_CATEGORY", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnOBJECT_CATEGORY)
+ Me.columnDESCRIPTION = New Global.System.Data.DataColumn("DESCRIPTION", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnDESCRIPTION)
+ Me.columnDISTINGUISHED_NAME = New Global.System.Data.DataColumn("DISTINGUISHED_NAME", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnDISTINGUISHED_NAME)
+ Me.columnNAME = New Global.System.Data.DataColumn("NAME", GetType(String), Nothing, Global.System.Data.MappingType.Element)
+ MyBase.Columns.Add(Me.columnNAME)
+ End Sub
+
+ _
+ Public Function NewTBLOCAL_DEBUG_GROUPSRow() As TBLOCAL_DEBUG_GROUPSRow
+ Return CType(Me.NewRow,TBLOCAL_DEBUG_GROUPSRow)
+ End Function
+
+ _
+ Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
+ Return New TBLOCAL_DEBUG_GROUPSRow(builder)
+ End Function
+
+ _
+ Protected Overrides Function GetRowType() As Global.System.Type
+ Return GetType(TBLOCAL_DEBUG_GROUPSRow)
+ End Function
+
+ _
+ Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanged(e)
+ If (Not (Me.TBLOCAL_DEBUG_GROUPSRowChangedEvent) Is Nothing) Then
+ RaiseEvent TBLOCAL_DEBUG_GROUPSRowChanged(Me, New TBLOCAL_DEBUG_GROUPSRowChangeEvent(CType(e.Row,TBLOCAL_DEBUG_GROUPSRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowChanging(e)
+ If (Not (Me.TBLOCAL_DEBUG_GROUPSRowChangingEvent) Is Nothing) Then
+ RaiseEvent TBLOCAL_DEBUG_GROUPSRowChanging(Me, New TBLOCAL_DEBUG_GROUPSRowChangeEvent(CType(e.Row,TBLOCAL_DEBUG_GROUPSRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleted(e)
+ If (Not (Me.TBLOCAL_DEBUG_GROUPSRowDeletedEvent) Is Nothing) Then
+ RaiseEvent TBLOCAL_DEBUG_GROUPSRowDeleted(Me, New TBLOCAL_DEBUG_GROUPSRowChangeEvent(CType(e.Row,TBLOCAL_DEBUG_GROUPSRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
+ MyBase.OnRowDeleting(e)
+ If (Not (Me.TBLOCAL_DEBUG_GROUPSRowDeletingEvent) Is Nothing) Then
+ RaiseEvent TBLOCAL_DEBUG_GROUPSRowDeleting(Me, New TBLOCAL_DEBUG_GROUPSRowChangeEvent(CType(e.Row,TBLOCAL_DEBUG_GROUPSRow), e.Action))
+ End If
+ End Sub
+
+ _
+ Public Sub RemoveTBLOCAL_DEBUG_GROUPSRow(ByVal row As TBLOCAL_DEBUG_GROUPSRow)
+ Me.Rows.Remove(row)
+ End Sub
+
+ _
+ Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
+ Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
+ Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
+ Dim ds As UserDataSet = New UserDataSet()
+ Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any1.Namespace = "http://www.w3.org/2001/XMLSchema"
+ any1.MinOccurs = New Decimal(0)
+ any1.MaxOccurs = Decimal.MaxValue
+ any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any1)
+ Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
+ any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
+ any2.MinOccurs = New Decimal(1)
+ any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
+ sequence.Items.Add(any2)
+ Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute1.Name = "namespace"
+ attribute1.FixedValue = ds.Namespace
+ type.Attributes.Add(attribute1)
+ Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
+ attribute2.Name = "tableTypeName"
+ attribute2.FixedValue = "TBLOCAL_DEBUG_GROUPSDataTable"
+ type.Attributes.Add(attribute2)
+ type.Particle = sequence
+ Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
+ If xs.Contains(dsSchema.TargetNamespace) Then
+ Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
+ Try
+ Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
+ dsSchema.Write(s1)
+ Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
+ Do While schemas.MoveNext
+ schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
+ s2.SetLength(0)
+ schema.Write(s2)
+ If (s1.Length = s2.Length) Then
+ s1.Position = 0
+ s2.Position = 0
+
+ Do While ((s1.Position <> s1.Length) _
+ AndAlso (s1.ReadByte = s2.ReadByte))
+
+
+ Loop
+ If (s1.Position = s1.Length) Then
+ Return type
+ End If
+ End If
+
+ Loop
+ Finally
+ If (Not (s1) Is Nothing) Then
+ s1.Close
+ End If
+ If (Not (s2) Is Nothing) Then
+ s2.Close
+ End If
+ End Try
+ End If
+ xs.Add(dsSchema)
+ Return type
+ End Function
+ End Class
+
'''
'''Represents strongly named DataRow class.
'''
@@ -7107,6 +7472,212 @@ Partial Public Class UserDataSet
End Sub
End Class
+ '''
+ '''Represents strongly named DataRow class.
+ '''
+ Partial Public Class TBLOCAL_DEBUG_GROUPSRow
+ Inherits Global.System.Data.DataRow
+
+ Private tableTBLOCAL_DEBUG_GROUPS As TBLOCAL_DEBUG_GROUPSDataTable
+
+ _
+ Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
+ MyBase.New(rb)
+ Me.tableTBLOCAL_DEBUG_GROUPS = CType(Me.Table,TBLOCAL_DEBUG_GROUPSDataTable)
+ End Sub
+
+ _
+ Public Property SAMACCOUNTNAME() As String
+ Get
+ Try
+ Return CType(Me(Me.tableTBLOCAL_DEBUG_GROUPS.SAMACCOUNTNAMEColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte SAMACCOUNTNAME in Tabelle TBLOCAL_DEBUG_GROUPS ist DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.SAMACCOUNTNAMEColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property CN() As String
+ Get
+ Try
+ Return CType(Me(Me.tableTBLOCAL_DEBUG_GROUPS.CNColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CN in Tabelle TBLOCAL_DEBUG_GROUPS ist DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.CNColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property OBJECT_CLASS() As String
+ Get
+ Try
+ Return CType(Me(Me.tableTBLOCAL_DEBUG_GROUPS.OBJECT_CLASSColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte OBJECT_CLASS in Tabelle TBLOCAL_DEBUG_GROUPS ist DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.OBJECT_CLASSColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property OBJECT_CATEGORY() As String
+ Get
+ Try
+ Return CType(Me(Me.tableTBLOCAL_DEBUG_GROUPS.OBJECT_CATEGORYColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte OBJECT_CATEGORY in Tabelle TBLOCAL_DEBUG_GROUPS ist DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.OBJECT_CATEGORYColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property DESCRIPTION() As String
+ Get
+ Try
+ Return CType(Me(Me.tableTBLOCAL_DEBUG_GROUPS.DESCRIPTIONColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte DESCRIPTION in Tabelle TBLOCAL_DEBUG_GROUPS ist DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.DESCRIPTIONColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property DISTINGUISHED_NAME() As String
+ Get
+ Try
+ Return CType(Me(Me.tableTBLOCAL_DEBUG_GROUPS.DISTINGUISHED_NAMEColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte DISTINGUISHED_NAME in Tabelle TBLOCAL_DEBUG_GROUPS ist DBNull"& _
+ ".", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.DISTINGUISHED_NAMEColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Property NAME() As String
+ Get
+ Try
+ Return CType(Me(Me.tableTBLOCAL_DEBUG_GROUPS.NAMEColumn),String)
+ Catch e As Global.System.InvalidCastException
+ Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte NAME in Tabelle TBLOCAL_DEBUG_GROUPS ist DBNull.", e)
+ End Try
+ End Get
+ Set
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.NAMEColumn) = value
+ End Set
+ End Property
+
+ _
+ Public Function IsSAMACCOUNTNAMENull() As Boolean
+ Return Me.IsNull(Me.tableTBLOCAL_DEBUG_GROUPS.SAMACCOUNTNAMEColumn)
+ End Function
+
+ _
+ Public Sub SetSAMACCOUNTNAMENull()
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.SAMACCOUNTNAMEColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsCNNull() As Boolean
+ Return Me.IsNull(Me.tableTBLOCAL_DEBUG_GROUPS.CNColumn)
+ End Function
+
+ _
+ Public Sub SetCNNull()
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.CNColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsOBJECT_CLASSNull() As Boolean
+ Return Me.IsNull(Me.tableTBLOCAL_DEBUG_GROUPS.OBJECT_CLASSColumn)
+ End Function
+
+ _
+ Public Sub SetOBJECT_CLASSNull()
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.OBJECT_CLASSColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsOBJECT_CATEGORYNull() As Boolean
+ Return Me.IsNull(Me.tableTBLOCAL_DEBUG_GROUPS.OBJECT_CATEGORYColumn)
+ End Function
+
+ _
+ Public Sub SetOBJECT_CATEGORYNull()
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.OBJECT_CATEGORYColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsDESCRIPTIONNull() As Boolean
+ Return Me.IsNull(Me.tableTBLOCAL_DEBUG_GROUPS.DESCRIPTIONColumn)
+ End Function
+
+ _
+ Public Sub SetDESCRIPTIONNull()
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.DESCRIPTIONColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsDISTINGUISHED_NAMENull() As Boolean
+ Return Me.IsNull(Me.tableTBLOCAL_DEBUG_GROUPS.DISTINGUISHED_NAMEColumn)
+ End Function
+
+ _
+ Public Sub SetDISTINGUISHED_NAMENull()
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.DISTINGUISHED_NAMEColumn) = Global.System.Convert.DBNull
+ End Sub
+
+ _
+ Public Function IsNAMENull() As Boolean
+ Return Me.IsNull(Me.tableTBLOCAL_DEBUG_GROUPS.NAMEColumn)
+ End Function
+
+ _
+ Public Sub SetNAMENull()
+ Me(Me.tableTBLOCAL_DEBUG_GROUPS.NAMEColumn) = Global.System.Convert.DBNull
+ End Sub
+ End Class
+
'''
'''Row event argument class
'''
@@ -7502,6 +8073,42 @@ Partial Public Class UserDataSet
End Get
End Property
End Class
+
+ '''
+ '''Row event argument class
+ '''
+ _
+ Public Class TBLOCAL_DEBUG_GROUPSRowChangeEvent
+ Inherits Global.System.EventArgs
+
+ Private eventRow As TBLOCAL_DEBUG_GROUPSRow
+
+ Private eventAction As Global.System.Data.DataRowAction
+
+ _
+ Public Sub New(ByVal row As TBLOCAL_DEBUG_GROUPSRow, ByVal action As Global.System.Data.DataRowAction)
+ MyBase.New
+ Me.eventRow = row
+ Me.eventAction = action
+ End Sub
+
+ _
+ Public ReadOnly Property Row() As TBLOCAL_DEBUG_GROUPSRow
+ Get
+ Return Me.eventRow
+ End Get
+ End Property
+
+ _
+ Public ReadOnly Property Action() As Global.System.Data.DataRowAction
+ Get
+ Return Me.eventAction
+ End Get
+ End Property
+ End Class
End Class
Namespace UserDataSetTableAdapters
diff --git a/DDUserManager/DDUserManager/UserDataSet.xsd b/DDUserManager/DDUserManager/UserDataSet.xsd
index 161043c..7a7b15b 100644
--- a/DDUserManager/DDUserManager/UserDataSet.xsd
+++ b/DDUserManager/DDUserManager/UserDataSet.xsd
@@ -1099,7 +1099,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1131,7 +1131,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1235,7 +1235,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1260,7 +1260,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1325,7 +1325,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1349,7 +1349,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1428,7 +1428,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1438,14 +1438,14 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
-
+
@@ -1477,7 +1477,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1509,7 +1509,7 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
+
@@ -1550,6 +1550,19 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1591,16 +1604,16 @@ VALUES (@NAME,@ADDED_WHO, 1, 1, 0, 1)
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/DDUserManager/DDUserManager/UserDataSet.xss b/DDUserManager/DDUserManager/UserDataSet.xss
index 84286bf..dd279ea 100644
--- a/DDUserManager/DDUserManager/UserDataSet.xss
+++ b/DDUserManager/DDUserManager/UserDataSet.xss
@@ -4,22 +4,23 @@
Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated.
-->
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
1322
@@ -31,7 +32,7 @@
-
+
304
@@ -47,7 +48,7 @@
-
+
606
@@ -59,7 +60,7 @@
-
+
606
@@ -71,7 +72,7 @@
-
+
306
@@ -83,7 +84,7 @@
-
+
1322
@@ -99,7 +100,7 @@
-
+
511
@@ -111,7 +112,7 @@
-
+
841
@@ -127,7 +128,7 @@
-
+
902
@@ -143,7 +144,7 @@
-
+
708
diff --git a/DDUserManager/DDUserManager/frmADDebug.Designer.vb b/DDUserManager/DDUserManager/frmADDebug.Designer.vb
new file mode 100644
index 0000000..b06fb40
--- /dev/null
+++ b/DDUserManager/DDUserManager/frmADDebug.Designer.vb
@@ -0,0 +1,62 @@
+ _
+Partial Class frmADDebug
+ Inherits System.Windows.Forms.Form
+
+ 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
+ _
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
+
+ 'Wird vom Windows Form-Designer benötigt.
+ Private components As System.ComponentModel.IContainer
+
+ 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
+ 'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
+ 'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
+ _
+ Private Sub InitializeComponent()
+ Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
+ Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
+ CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'GridControl1
+ '
+ Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.GridControl1.Location = New System.Drawing.Point(0, 0)
+ Me.GridControl1.MainView = Me.GridView1
+ Me.GridControl1.Name = "GridControl1"
+ Me.GridControl1.Size = New System.Drawing.Size(800, 450)
+ Me.GridControl1.TabIndex = 1
+ Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
+ '
+ 'GridView1
+ '
+ Me.GridView1.GridControl = Me.GridControl1
+ Me.GridView1.Name = "GridView1"
+ '
+ 'frmADDebug
+ '
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.ClientSize = New System.Drawing.Size(800, 450)
+ Me.Controls.Add(Me.GridControl1)
+ Me.Name = "frmADDebug"
+ Me.Text = "frmADDebug"
+ CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+
+ End Sub
+
+ Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl
+ Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
+End Class
diff --git a/DDUserManager/DDUserManager/frmADDebug.resx b/DDUserManager/DDUserManager/frmADDebug.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/DDUserManager/DDUserManager/frmADDebug.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/DDUserManager/DDUserManager/frmADDebug.vb b/DDUserManager/DDUserManager/frmADDebug.vb
new file mode 100644
index 0000000..82f1ade
--- /dev/null
+++ b/DDUserManager/DDUserManager/frmADDebug.vb
@@ -0,0 +1,17 @@
+Imports DDUserManager.ClassActiveDirectory
+
+Public Class frmADDebug
+ Public Property DebugData As List(Of GroupResult)
+
+ Private Sub frmADDebug_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ Dim table As New UserDataSet.TBLOCAL_DEBUG_GROUPSDataTable()
+
+ For Each group In DebugData
+ table.AddTBLOCAL_DEBUG_GROUPSRow(group.SAMAccountName, group.CN, group.ObjectClass, group.ObjectCategory, group.Description, group.DistinguishedName, group.Name)
+ Next
+
+
+ Me.Text = $"{table.Rows.Count} Gruppen"
+ GridControl1.DataSource = table
+ End Sub
+End Class
\ No newline at end of file
diff --git a/DDUserManager/DDUserManager/frmADImport_Groups.Designer.vb b/DDUserManager/DDUserManager/frmADImport_Groups.Designer.vb
index f88cf72..d2cb21f 100644
--- a/DDUserManager/DDUserManager/frmADImport_Groups.Designer.vb
+++ b/DDUserManager/DDUserManager/frmADImport_Groups.Designer.vb
@@ -31,6 +31,7 @@ Partial Class frmADImport_Groups
Me.colGROUPNAME = New DevExpress.XtraGrid.Columns.GridColumn()
Me.btnImport = New System.Windows.Forms.Button()
Me.DS_ChangeS = New DDUserManager.DS_ChangeS()
+ Me.lbGroupsCount = New System.Windows.Forms.Label()
CType(Me.gridAD_Groups, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TBLOCAL_ADGROUPSBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.UserDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -95,11 +96,21 @@ Partial Class frmADImport_Groups
Me.DS_ChangeS.DataSetName = "DS_ChangeS"
Me.DS_ChangeS.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
'
+ 'lbGroupsCount
+ '
+ Me.lbGroupsCount.AutoSize = True
+ Me.lbGroupsCount.Location = New System.Drawing.Point(12, 616)
+ Me.lbGroupsCount.Name = "lbGroupsCount"
+ Me.lbGroupsCount.Size = New System.Drawing.Size(103, 13)
+ Me.lbGroupsCount.TabIndex = 2
+ Me.lbGroupsCount.Text = "Anzahl Gruppen: {0}"
+ '
'frmADImport_Groups
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1154, 688)
+ Me.Controls.Add(Me.lbGroupsCount)
Me.Controls.Add(Me.btnImport)
Me.Controls.Add(Me.gridAD_Groups)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
@@ -111,6 +122,7 @@ Partial Class frmADImport_Groups
CType(Me.viewAD_Groups, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.DS_ChangeS, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
+ Me.PerformLayout()
End Sub
@@ -121,4 +133,5 @@ Partial Class frmADImport_Groups
Friend WithEvents colGROUPNAME As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents btnImport As Button
Friend WithEvents DS_ChangeS As DS_ChangeS
+ Friend WithEvents lbGroupsCount As Label
End Class
diff --git a/DDUserManager/DDUserManager/frmADImport_Groups.vb b/DDUserManager/DDUserManager/frmADImport_Groups.vb
index 0f4ae58..118161b 100644
--- a/DDUserManager/DDUserManager/frmADImport_Groups.vb
+++ b/DDUserManager/DDUserManager/frmADImport_Groups.vb
@@ -5,14 +5,16 @@ Public Class frmADImport_Groups
Private Sub frmADImport_Groups_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try
- Dim groups = ClassActiveDirectory.GetActiveDirectoryGroups()
+ Dim groups = ClassActiveDirectory.GetActiveDirectoryGroups(My.Settings.AD_GROUP_QUERY)
UserDataSet.TBLOCAL_ADGROUPS.Clear()
- For Each group In groups
- UserDataSet.TBLOCAL_ADGROUPS.AddTBLOCAL_ADGROUPSRow(group)
+ For Each group As ClassActiveDirectory.GroupResult In groups
+ UserDataSet.TBLOCAL_ADGROUPS.AddTBLOCAL_ADGROUPSRow(group.SAMAccountName)
Next
+ lbGroupsCount.Text = String.Format(lbGroupsCount.Text, UserDataSet.TBLOCAL_ADGROUPS.Rows.Count)
+
gridAD_Groups.DataSource = UserDataSet.TBLOCAL_ADGROUPS
Catch ex As Exception
logger.Error(ex, "Error while loading initial groups")
diff --git a/DDUserManager/DDUserManager/frmADImport_Users.vb b/DDUserManager/DDUserManager/frmADImport_Users.vb
index fbfa5e4..94408a5 100644
--- a/DDUserManager/DDUserManager/frmADImport_Users.vb
+++ b/DDUserManager/DDUserManager/frmADImport_Users.vb
@@ -10,9 +10,11 @@ Public Class frmADImport_Users
Private Sub frmADImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try
- Dim groups = ClassActiveDirectory.GetActiveDirectoryGroups()
+ Dim groups = ClassActiveDirectory.GetActiveDirectoryGroups(My.Settings.AD_GROUP_QUERY)
- gridAD_Groups.DataSource = groups
+ gridAD_Groups.DataSource = groups.Select(Of String)(Function(g)
+ Return g.SAMAccountName
+ End Function)
viewAD_Groups.Columns.Item(0).Caption = "Gruppe"
Catch ex As Exception
logger.Error(ex, $"Error while loading initial groups")
diff --git a/DDUserManager/DDUserManager/frmMain.Designer.vb b/DDUserManager/DDUserManager/frmMain.Designer.vb
index a83050c..bbf7a26 100644
--- a/DDUserManager/DDUserManager/frmMain.Designer.vb
+++ b/DDUserManager/DDUserManager/frmMain.Designer.vb
@@ -326,6 +326,9 @@ Partial Class frmMain
Me.tabPageRights = New DevExpress.XtraTab.XtraTabPage()
Me.tabPageSettings = New DevExpress.XtraTab.XtraTabPage()
Me.Button2 = New System.Windows.Forms.Button()
+ Me.GroupBox2 = New System.Windows.Forms.GroupBox()
+ Me.btnDebugGroupQuery = New System.Windows.Forms.Button()
+ Me.txtLDAPGroupQuery = New System.Windows.Forms.TextBox()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.btnADConnectionTest = New System.Windows.Forms.Button()
Me.txtADRootNode = New System.Windows.Forms.TextBox()
@@ -507,6 +510,7 @@ Partial Class frmMain
CType(Me.TBDD_MODULESBindingNavigator, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TBDD_MODULESBindingNavigator.SuspendLayout()
Me.tabPageSettings.SuspendLayout()
+ Me.GroupBox2.SuspendLayout()
Me.GroupBox1.SuspendLayout()
CType(Me.TBDD_GROUPS_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TBDD_CLIENT_USERBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -3495,6 +3499,7 @@ Partial Class frmMain
'tabPageSettings
'
Me.tabPageSettings.Controls.Add(Me.Button2)
+ Me.tabPageSettings.Controls.Add(Me.GroupBox2)
Me.tabPageSettings.Controls.Add(Me.GroupBox1)
Me.tabPageSettings.Controls.Add(Me.btnOpenLogDir)
Me.tabPageSettings.Controls.Add(Me.btnOpenConfigDir)
@@ -3515,6 +3520,36 @@ Partial Class frmMain
Me.Button2.Text = "Support Tool aufrufen"
Me.Button2.UseVisualStyleBackColor = True
'
+ 'GroupBox2
+ '
+ Me.GroupBox2.Controls.Add(Me.btnDebugGroupQuery)
+ Me.GroupBox2.Controls.Add(Me.txtLDAPGroupQuery)
+ Me.GroupBox2.Location = New System.Drawing.Point(486, 17)
+ Me.GroupBox2.Name = "GroupBox2"
+ Me.GroupBox2.Size = New System.Drawing.Size(700, 200)
+ Me.GroupBox2.TabIndex = 5
+ Me.GroupBox2.TabStop = False
+ Me.GroupBox2.Text = "LDAP Gruppenabfrage"
+ '
+ 'btnDebugGroupQuery
+ '
+ Me.btnDebugGroupQuery.Location = New System.Drawing.Point(556, 171)
+ Me.btnDebugGroupQuery.Name = "btnDebugGroupQuery"
+ Me.btnDebugGroupQuery.Size = New System.Drawing.Size(138, 23)
+ Me.btnDebugGroupQuery.TabIndex = 6
+ Me.btnDebugGroupQuery.Text = "Abfrage starten"
+ Me.btnDebugGroupQuery.UseVisualStyleBackColor = True
+ '
+ 'txtLDAPGroupQuery
+ '
+ Me.txtLDAPGroupQuery.Location = New System.Drawing.Point(6, 20)
+ Me.txtLDAPGroupQuery.Multiline = True
+ Me.txtLDAPGroupQuery.Name = "txtLDAPGroupQuery"
+ Me.txtLDAPGroupQuery.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
+ Me.txtLDAPGroupQuery.Size = New System.Drawing.Size(688, 145)
+ Me.txtLDAPGroupQuery.TabIndex = 2
+ Me.txtLDAPGroupQuery.Text = "(&(objectClass=group) (samAccountName=*))"
+ '
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.btnADConnectionTest)
@@ -3839,6 +3874,8 @@ Partial Class frmMain
Me.TBDD_MODULESBindingNavigator.ResumeLayout(False)
Me.TBDD_MODULESBindingNavigator.PerformLayout()
Me.tabPageSettings.ResumeLayout(False)
+ Me.GroupBox2.ResumeLayout(False)
+ Me.GroupBox2.PerformLayout()
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
CType(Me.TBDD_GROUPS_USERBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
@@ -4147,4 +4184,7 @@ Partial Class frmMain
Friend WithEvents GroupBox1 As GroupBox
Friend WithEvents btnADConnectionTest As Button
Friend WithEvents Button2 As Button
+ Friend WithEvents GroupBox2 As GroupBox
+ Friend WithEvents btnDebugGroupQuery As Button
+ Friend WithEvents txtLDAPGroupQuery As TextBox
End Class
diff --git a/DDUserManager/DDUserManager/frmMain.vb b/DDUserManager/DDUserManager/frmMain.vb
index 5dbf231..930f396 100644
--- a/DDUserManager/DDUserManager/frmMain.vb
+++ b/DDUserManager/DDUserManager/frmMain.vb
@@ -26,6 +26,8 @@ Public Class frmMain
NLog.LogManager.Configuration = ClassNLog.GetLoggerConfigFor(MODULE_NAME)
CurrentVersion = Assembly.GetEntryAssembly().GetName().Version.ToString()
+ txtLDAPGroupQuery.DataBindings.Add(New Binding("Text", My.Settings, "AD_GROUP_QUERY"))
+
logger.Info("Starting UserManager v" & CurrentVersion)
logger.Info($"Current Username: {Environment.UserName}")
@@ -1067,7 +1069,7 @@ Public Class frmMain
Process.Start(ClassNLog.GetLogPathFor(MODULE_NAME))
End Sub
- Private Sub txtADRootNode_Leave(sender As Object, e As EventArgs) Handles txtADRootNode.Leave
+ Private Sub txtADRootNode_Leave(sender As Object, e As EventArgs) Handles txtADRootNode.Leave, txtLDAPGroupQuery.Leave
SaveMySettingsValue("ActiveDirectoryRootNode", txtADRootNode.Text, "ConfigMain")
End Sub
@@ -1087,4 +1089,27 @@ Public Class frmMain
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Process.Start("https://didalog.de/support")
End Sub
+
+ Private Async Sub btnDebugQuery_Click(sender As Object, e As EventArgs) Handles btnDebugGroupQuery.Click
+ My.Settings.Save()
+
+ btnDebugGroupQuery.Text = "Abfrage läuft..."
+ btnDebugGroupQuery.Enabled = False
+
+ Await Task.Run(Sub()
+ Dim groups = ClassActiveDirectory.GetActiveDirectoryGroups(txtLDAPGroupQuery.Text)
+ Dim frm As New frmADDebug()
+ frm.DebugData = groups
+ frm.ShowDialog()
+
+
+ End Sub)
+
+ btnDebugGroupQuery.Text = "Abfrage starten"
+ btnDebugGroupQuery.Enabled = True
+ End Sub
+
+ Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter
+
+ End Sub
End Class
diff --git a/DDUserManager/SetupWix/Product.wxs b/DDUserManager/SetupWix/Product.wxs
index 68ee48a..c4e01db 100644
--- a/DDUserManager/SetupWix/Product.wxs
+++ b/DDUserManager/SetupWix/Product.wxs
@@ -80,6 +80,7 @@
+