File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
src/SIL.XForge.Scripture/Services
test/SIL.XForge.Scripture.Tests/Services Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,8 @@ Task<QueryResults<EventMetric>> GetEventMetricsAsync(
5959 Task < IReadOnlyList < InviteeStatus > > InvitedUsersAsync ( string curUserId , string projectId ) ;
6060 bool IsSourceProject ( string projectId ) ;
6161 Task < IEnumerable < TransceleratorQuestion > > TransceleratorQuestionsAsync ( string curUserId , string projectId ) ;
62+
63+ [ Mutex ]
6264 Task SyncUserRoleAsync ( string curUserId , string projectId ) ;
6365 Task UpdatePermissionsAsync (
6466 string curUserId ,
Original file line number Diff line number Diff line change @@ -2078,8 +2078,7 @@ private async Task<TranslateSource> GetTranslateSourceAsync(
20782078 else if ( updatePermissions )
20792079 {
20802080 // Update all the permissions for all the users on this project or resource
2081- IDocument < SFProject > projectDoc = await GetProjectDocAsync ( sourceProjectRef , conn ) ;
2082- await UpdatePermissionsAsync ( curUserId , projectDoc ) ;
2081+ _backgroundJobClient . Enqueue < ISFProjectService > ( r => r . SyncUserRoleAsync ( curUserId , sourceProjectRef ) ) ;
20832082 }
20842083
20852084 return new TranslateSource
Original file line number Diff line number Diff line change @@ -2788,8 +2788,9 @@ await env.Service.UpdateSettingsAsync(
27882788
27892789 SFProject project = env . GetProject ( Project01 ) ;
27902790 Assert . That ( project . TranslateConfig . Source . ProjectRef , Is . EqualTo ( Resource01 ) ) ;
2791+ env . BackgroundJobClient . Received ( 1 ) . Create ( Arg . Any < Job > ( ) , Arg . Any < IState > ( ) ) ;
27912792 await env
2792- . ParatextService . Received ( 2 )
2793+ . ParatextService . Received ( 1 )
27932794 . GetPermissionsAsync (
27942795 Arg . Any < UserSecret > ( ) ,
27952796 Arg . Is < SFProject > ( p => p . ParatextId == Resource01PTId ) ,
You can’t perform that action at this time.
0 commit comments