File tree Expand file tree Collapse file tree 5 files changed +10
-9
lines changed
AuthPermissions.AspNetCore
AuthPermissions.SupportCode/DownStatusCode
Example6.MvcWebApp.Sharding/Controllers Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 88 <copyright >Copyright (c) 2021 Jon P Smith</copyright >
99 <description >Provides extra authorization and multi-tenant features to a ASP.NET Core application.</description >
1010 <releaseNotes >
11- - New feature: Stop users linked to a tenant from accessing the the tenant while its being changed - see Example4 and Example6
11+ - BREAKING CHANGE (small): Refresh users claims now uses Net.DistributedFileStoreCache - see Example4
1212- New feature: Take the application "down for maintenance", which diverts users to a "please wait" page - see Example4 and Example6
1313- New feature: Code for minimal API's fluent HasPermission - see pull request #51. (thanks to @idan-h)
14+ - Improved feature: Added timeout on user invitation - see Example 3 and 5 (inspired by @idan-h)
1415- Improved feature: The name of the sharding file can have an EnvironmentName, e.g. "shardingsettings.Production.json"
1516- Improved feature: The RefreshUsersClaims classes have been moved to SupportCode project and a few classes have been renamed
1617- Improved feature: Sharding now has distributed lock on changes to the shardingsettings.json file
17- - Improved feature: Refresh users claims now uses Net.DistributedFileStoreCache - see Example4
18- - Improved feature: Added timeout on user invitation - see Example 3 and 5 (inspired by @idan-h)
1918- Improved feature: The AuthUserAdmin method QueryAuthUsers now takes an optional DatabaseInfoName to allow tenant admin users on sharding
2019- Bug Fix: The ReadShardingSettingsFile now return the default sharding DatabaseInformation if no sharding file is found
2120- Updated NuGets: There was a security alert on one of the NuGets. All the NuGets have been updated to the latest
Original file line number Diff line number Diff line change 1010 <copyright >Copyright (c) 2021 Jon P Smith</copyright >
1111 <description >Provides extra authorization and multi-tenant features to a ASP.NET Core application.</description >
1212 <releaseNotes >
13- - New feature: Stop users linked to a tenant from accessing the the tenant while its being changed - see Example4 and Example6
13+ - BREAKING CHANGE (small): Refresh users claims now uses Net.DistributedFileStoreCache - see Example4
1414- New feature: Take the application "down for maintenance", which diverts users to a "please wait" page - see Example4 and Example6
1515- New feature: Code for minimal API's fluent HasPermission - see pull request #51. (thanks to @idan-h)
16+ - Improved feature: Added timeout on user invitation - see Example 3 and 5 (inspired by @idan-h)
1617- Improved feature: The name of the sharding file can have an EnvironmentName, e.g. "shardingsettings.Production.json"
1718- Improved feature: The RefreshUsersClaims classes have been moved to SupportCode project and a few classes have been renamed
1819- Improved feature: Sharding now has distributed lock on changes to the shardingsettings.json file
19- - Improved feature: Refresh users claims now uses Net.DistributedFileStoreCache - see Example4
20- - Improved feature: Added timeout on user invitation - see Example 3 and 5 (inspired by @idan-h)
2120- Improved feature: The AuthUserAdmin method QueryAuthUsers now takes an optional DatabaseInfoName to allow tenant admin users on sharding
2221- Bug Fix: The ReadShardingSettingsFile now return the default sharding DatabaseInformation if no sharding file is found
2322- Updated NuGets: There was a security alert on one of the NuGets. All the NuGets have been updated to the latest
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ public async Task<Func<Task>> SetTenantDownWithDelayAsync(TenantDownVersions dow
119119 return ( ) => RemoveTenantDownAsync ( downType , mainKey , secondaryKey ) ;
120120 }
121121
122+ //Not used, but kept in case it might be useful
122123 ///// <summary>
123124 ///// This removes the cache entry that was "downing" the tenant
124125 ///// </summary>
Original file line number Diff line number Diff line change @@ -112,7 +112,10 @@ public async Task<IActionResult> Delete(int id)
112112 [ HasPermission ( Example6Permissions . TenantDelete ) ]
113113 public async Task < IActionResult > Delete ( ShardingSingleLevelTenantDto input )
114114 {
115+ var removeDownAsync = await _upDownService . SetTenantDownWithDelayAsync ( TenantDownVersions . Deleted , input . TenantId ) ;
115116 var status = await _authTenantAdmin . DeleteTenantAsync ( input . TenantId ) ;
117+ if ( status . HasErrors )
118+ await removeDownAsync ( ) ;
116119
117120 return status . HasErrors
118121 ? RedirectToAction ( nameof ( ErrorDisplay ) ,
Original file line number Diff line number Diff line change 66
77## 3.4.0
88
9- - New feature: Stop users linked to a tenant from accessing the the tenant while its being changed - see Example4 and Example6
9+ - BREAKING CHANGE (small): Refresh users claims now uses Net.DistributedFileStoreCache - see Example4
1010- New feature: Take the application "down for maintenance", which diverts users to a "please wait" page - see Example4 and Example6
1111- New feature: Code for minimal API's fluent HasPermission - see pull request #51 . (thanks to @idan-h )
12+ - Improved feature: Added timeout on user invitation - see Example 3 and 5 (inspired by @idan-h )
1213- Improved feature: The name of the sharding file can have an EnvironmentName, e.g. "shardingsettings.Production.json"
1314- Improved feature: The RefreshUsersClaims classes have been moved to SupportCode project and a few classes have been renamed
1415- Improved feature: Sharding now has distributed lock on changes to the shardingsettings.json file
15- - Improved feature: Refresh users claims now uses Net.DistributedFileStoreCache - see Example4
16- - Improved feature: Added timeout on user invitation - see Example 3 and 5 (inspired by @idan-h )
1716- Improved feature: The AuthUserAdmin method QueryAuthUsers now takes an optional DatabaseInfoName to allow tenant admin users on sharding
1817- Bug Fix: The ReadShardingSettingsFile now return the default sharding DatabaseInformation if no sharding file is found
1918- Updated NuGets: There was a security alert on one of the NuGets. All the NuGets have been updated to the latest
You can’t perform that action at this time.
0 commit comments