Skip to content

Commit fbe1b08

Browse files
committed
Merge remote-tracking branch 'origin/hotfix-19.1' into develop
2 parents 3f87896 + c64c42d commit fbe1b08

6 files changed

Lines changed: 17 additions & 11 deletions

File tree

Rock.Tests/Cms/ThemeOverrideBuilderTests.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Text.RegularExpressions;
34

45
using Microsoft.VisualStudio.TestTools.UnitTesting;
56

@@ -415,12 +416,9 @@ public void Build_WithAllOptions_EmitsInCorrectOrder()
415416
{
416417
using ( TestHelper.CreateScopedRockApp() )
417418
{
418-
var tablerPath = RockApp.Current.MapPath( "~/Styles/styles-v2/icons/tabler-icon.css" );
419-
var tablerHash = System.IO.File.ReadAllText( tablerPath ).XxHash();
420-
421419
var expectedContent = $@"{ThemeOverrideBuilder.TopOverrideStartMarker}
422420
@import url('on.css');
423-
@import url('/Styles/styles-v2/icons/tabler-icon.css?v={tablerHash}');
421+
@import url('/Styles/styles-v2/icons/tabler-icon.css');
424422
{ThemeOverrideBuilder.TopOverrideEndMarker}
425423
426424
@@ -449,6 +447,12 @@ public void Build_WithAllOptions_EmitsInCorrectOrder()
449447

450448
var content = builder.Build( string.Empty ).Trim();
451449

450+
// The builder adds a version hash to the tabler icons import,
451+
// but only if the file exists. Depending on the state of the
452+
// cloned repository, it may or may not exist. If it does, just
453+
// strip it out.
454+
content = Regex.Replace( content, @"tabler-icon\.css\?v=[^']+", "tabler-icon.css" );
455+
452456
Assert.AreEqual( expectedContent, content );
453457
}
454458
}

Rock/Model/Workflow/Workflow/Workflow.Logic.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public bool HasActiveEntryForm( Person person )
275275
( canEdit ) ||
276276
( !a.AssignedGroupId.HasValue && !a.AssignedPersonAliasId.HasValue ) ||
277277
( a.AssignedPersonAlias != null && a.AssignedPersonAlias.PersonId == personId ) ||
278-
( a.AssignedGroup != null && a.AssignedGroup.Members.Any( m => m.PersonId == personId ) )
278+
( a.AssignedGroup != null && a.AssignedGroup.Members.Any( m => m.PersonId == personId && m.GroupMemberStatus != GroupMemberStatus.Inactive ) )
279279
)
280280
)
281281
.ToList()
@@ -325,7 +325,7 @@ internal WorkflowAction GetNextInteractiveAction( Person person, int? actionId,
325325
skipAuthorization
326326
|| ( !a.AssignedGroupId.HasValue && !a.AssignedPersonAliasId.HasValue )
327327
|| ( a.AssignedPersonAlias != null && a.AssignedPersonAlias.PersonId == personId )
328-
|| ( a.AssignedGroup != null && a.AssignedGroup.Members.Any( m => m.PersonId == personId ) )
328+
|| ( a.AssignedGroup != null && a.AssignedGroup.Members.Any( m => m.PersonId == personId && m.GroupMemberStatus != GroupMemberStatus.Inactive ) )
329329
)
330330
)
331331
.OrderBy( a => a.ActivityTypeCache.Order )

Rock/Model/Workflow/WorkflowAction/WorkflowActionService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public List<WorkflowAction> GetActiveForms( Person person )
6363
.Where( a => a.ActivatedDateTime.HasValue && !a.CompletedDateTime.HasValue )
6464
.Where( a =>
6565
( a.AssignedPersonAliasId.HasValue && personAliasIds.Contains( a.AssignedPersonAliasId.Value ) ) ||
66-
( a.AssignedGroupId.HasValue && a.AssignedGroup.Members.Any( m => m.PersonId == person.Id ) ) ).Select( a => a.Id ).ToList();
66+
( a.AssignedGroupId.HasValue && a.AssignedGroup.Members.Any( m => m.PersonId == person.Id && m.GroupMemberStatus != GroupMemberStatus.Inactive ) ) ).Select( a => a.Id ).ToList();
6767

6868
// Get all of the active form actions with an activity that assigned to the specified person
6969
var formActionsQry = GetActiveForms().Where( a => assignedActiveActivityIdList.Contains( a.ActivityId ) );

RockWeb/Blocks/Fundraising/FundraisingLeaderToolbox.ascx.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ protected void BindGroupMembersGrid()
170170
var rockContext = new RockContext();
171171

172172
int groupId = hfGroupId.Value.AsInteger();
173-
var groupMembersQuery = new GroupMemberService( rockContext ).Queryable().Where( a => a.GroupId == groupId );
173+
var groupMembersQuery = new GroupMemberService( rockContext )
174+
.Queryable()
175+
.Where( a => a.GroupId == groupId && a.GroupMemberStatus == GroupMemberStatus.Active );
174176
var group = new GroupService( rockContext ).Get( groupId );
175177
group.LoadAttributes( rockContext );
176178
var defaultIndividualFundRaisingGoal = group.GetAttributeValue( "IndividualFundraisingGoal" ).AsDecimalOrNull();

RockWeb/Blocks/WorkFlow/MyWorkflows.ascx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ private void GetData()
347347
authorizedActivityTypes.Contains( a.ActionType.ActivityTypeId ) &&
348348
(
349349
( a.Activity.AssignedPersonAlias != null && a.Activity.AssignedPersonAlias.PersonId == personId ) ||
350-
( a.Activity.AssignedGroup != null && a.Activity.AssignedGroup.Members.Any( m => m.PersonId == personId ) )
350+
( a.Activity.AssignedGroup != null && a.Activity.AssignedGroup.Members.Any( m => m.PersonId == personId && m.GroupMemberStatus != GroupMemberStatus.Inactive ) )
351351
)
352352
)
353353
.ToList();

RockWeb/Blocks/WorkFlow/WorkflowEntry.ascx.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ private bool HydrateObjects()
694694
/* if user isn't authorized to edit, limit to ones that are any of the following conditions
695695
// - Not assigned
696696
// - Assigned to current person
697-
// - Assigned to a group that the current user is a member of
697+
// - Assigned to a group that the current user is member (non-inactive) of
698698
*/
699699

700700
activeWorkflowActivitiesList = activeWorkflowActivitiesList.Where( a =>
@@ -711,7 +711,7 @@ private bool HydrateObjects()
711711
return true;
712712
}
713713

714-
if ( a.AssignedGroup != null && a.AssignedGroup.Members.Any( m => m.PersonId == personId ) )
714+
if ( a.AssignedGroup != null && a.AssignedGroup.Members.Any( m => m.PersonId == personId && m.GroupMemberStatus != GroupMemberStatus.Inactive ) )
715715
{
716716
// Assigned to a group that the current user is a member of
717717
return true;

0 commit comments

Comments
 (0)