Skip to content

Commit

Permalink
+ (Core) Fixed Group List Block Root Group not being set. (Fixes #5331)
Browse files Browse the repository at this point in the history
  • Loading branch information
melzs0627 committed Apr 6, 2023
1 parent 38806ac commit 37e2ca9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions RockWeb/Blocks/Groups/GroupList.ascx.cs
Expand Up @@ -778,6 +778,16 @@ private void BindGrid()
var qryGroups = groupService.Queryable()
.Where( g => groupTypeIds.Contains( g.GroupTypeId ) && ( !onlySecurityGroups || g.IsSecurityRole ) );

var rootGroupGuid = GetAttributeValue( AttributeKey.RootGroup ).AsGuidOrNull();
if ( rootGroupGuid.HasValue )
{
var parentGroup = groupService.Get( rootGroupGuid.Value );
if ( parentGroup != null )
{
qryGroups = qryGroups.Where( g => g.ParentGroupId == parentGroup.Id );
}
}

string limitToActiveStatus = GetAttributeValue( "LimittoActiveStatus" );

bool showActive = true;
Expand Down

0 comments on commit 37e2ca9

Please sign in to comment.