Skip to content

Commit

Permalink
Merge pull request #76 from 40fingers/feature/75-settings-rolegroups-…
Browse files Browse the repository at this point in the history
…issue

Feature/75 settings rolegroups issue

Closes #75
  • Loading branch information
skamphuis authored Jan 11, 2022
2 parents f59179d + 1ef98de commit 06a155f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
12 changes: 12 additions & 0 deletions Components/Common.vb
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,18 @@ Namespace Ventrian.NewsArticles
return retval
End Function

Public shared Function ToList(Of T As Class)(objArrayList As ArrayList) As List(Of T)
Dim retval As New List(Of T)()

For Each objItem As Object In objArrayList
Dim newItem As T = TryCast(objItem, T)
If Not newItem Is Nothing Then
retval.Add(newItem)
End If
Next

Return retval
End Function

#End Region

Expand Down
Binary file added Installs/NewsArticles.00.12.00.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("1.0.8.02")>
<Assembly: AssemblyFileVersion("1.0.8.02")>
<Assembly: AssemblyVersion("1.12.00.00")>
<Assembly: AssemblyFileVersion("1.12.00.00")>
10 changes: 5 additions & 5 deletions NewsArticles.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="6.0">
<packages>
<package name="DnnForge - NewsArticles" type="Module" version="00.11.03">
<package name="DnnForge - NewsArticles" type="Module" version="00.12.00">
<friendlyName>News Articles</friendlyName>
<description>
<![CDATA[
Expand Down Expand Up @@ -864,7 +864,7 @@
</component>
</components>
</package>
<package name="DnnForge - LatestArticles" type="Module" version="00.11.03">
<package name="DnnForge - LatestArticles" type="Module" version="00.12.00">
<friendlyName>News Articles Latest</friendlyName>
<description>Allows you to display a list of the latest articles.</description>
<iconFile />
Expand Down Expand Up @@ -925,7 +925,7 @@
</component>
</components>
</package>
<package name="DnnForge - LatestComments" type="Module" version="00.11.03">
<package name="DnnForge - LatestComments" type="Module" version="00.12.00">
<friendlyName>News Articles Comments</friendlyName>
<description>Allows you to display a list of the latest comments.</description>
<iconFile />
Expand Down Expand Up @@ -986,7 +986,7 @@
</component>
</components>
</package>
<package name="DnnForge - NewsArchives" type="Module" version="00.11.03">
<package name="DnnForge - NewsArchives" type="Module" version="00.12.00">
<friendlyName>News Articles Archives</friendlyName>
<description>Allows you to display a list of articles by month.</description>
<iconFile />
Expand Down Expand Up @@ -1047,7 +1047,7 @@
</component>
</components>
</package>
<package name="DnnForge - NewsSearch" type="Module" version="00.11.03">
<package name="DnnForge - NewsSearch" type="Module" version="00.12.00">
<friendlyName>News Articles Search</friendlyName>
<description>Allows you to display a list of articles by month.</description>
<iconFile />
Expand Down
4 changes: 2 additions & 2 deletions ucViewOptions.ascx.vb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ Namespace Ventrian.NewsArticles
roles = RoleController.Instance.GetRoles(PortalId)
Else
Dim objRole As New RoleController
roles = objRole.GetRolesByGroup(PortalId, Convert.ToInt32(drpSecurityRoleGroups.SelectedValue))
roles = Common.ToList(Of RoleInfo)(objRole.GetRolesByGroup(PortalId, Convert.ToInt32(drpSecurityRoleGroups.SelectedValue)))
End If

If Not roles Is Nothing Then
For Each Role As RoleInfo In roles
availableRoles.Add(New ListItem(Role.RoleName, Role.RoleName))
Expand Down

0 comments on commit 06a155f

Please sign in to comment.