From 0ba914888980e7ffa2a8f39c8d8853162719b745 Mon Sep 17 00:00:00 2001 From: jxnkwlp Date: Thu, 9 Nov 2023 22:07:10 +0800 Subject: [PATCH] fix: add `virtual` to all public method --- .../DbMigratorHostedService.cs | 4 ++-- .../Data/NullSampleDbSchemaMigrator.cs | 2 +- .../Data/SampleDbMigrationService.cs | 2 +- ...tityFrameworkCoreSampleDbSchemaMigrator.cs | 2 +- modules/account/common.props | 9 +++++++ modules/account/src/Directory.Build.props | 14 ----------- .../AccountImpersonationAppService.cs | 2 +- .../AccountTfaAppService.cs | 7 ++---- .../Settings/AccountSettingsManager.cs | 4 ++-- .../AccountAdminSettingsController.cs | 20 ++++++++-------- .../AccountImpersonationController.cs | 2 +- .../AccountTfaController.cs | 4 ++-- modules/api-keys/common.props | 9 +++++++ modules/api-keys/src/Directory.Build.props | 14 ----------- .../Repositories/ApiKeyRecordRepository.cs | 8 +++---- .../Repositories/ApiKeyRecordRepository.cs | 8 +++---- modules/common.props | 4 ++-- modules/dictionary-management/common.props | 11 ++++++++- .../src/Directory.Build.props | 14 ----------- .../Dictionaries/DictionaryAppService.cs | 4 ++-- .../Dictionaries/DictionaryGroupAppService.cs | 2 +- .../Dictionaries/DictionaryItemAppService.cs | 2 +- .../Repositories/DictionaryGroupRepository.cs | 8 +++---- .../Repositories/DictionaryItemRepository.cs | 6 ++--- .../Repositories/DictionaryGroupRepository.cs | 12 +++++----- .../Repositories/DictionaryItemRepository.cs | 6 ++--- .../common.props | 10 +++++++- .../src/Directory.Build.props | 14 ----------- .../DynamicPermissionDefinitionAppService.cs | 2 +- ...amicPermissionGroupDefinitionAppService.cs | 2 +- ...PermissionDefinitionDataSeedContributor.cs | 2 +- .../DynamicPermissionDefinitionEventHander.cs | 12 +++++----- .../DynamicPermissionDefinitionRepository.cs | 2 +- ...amicPermissionGroupDefinitionRepository.cs | 2 +- .../DynamicPermissionDefinitionController.cs | 2 +- ...amicPermissionGroupDefinitionController.cs | 2 +- .../DynamicPermissionDefinitionRepository.cs | 2 +- ...amicPermissionGroupDefinitionRepository.cs | 2 +- modules/file-management/common.props | 13 ++++++++-- .../file-management/src/Directory.Build.props | 14 ----------- .../Files/FileContainerAppService.cs | 2 +- .../EventHandler/FileEventHander.cs | 2 +- .../Files/DefaultFileBlobContainerProvider.cs | 2 +- .../Files/DefaultFileBlobNameGenerator.cs | 2 +- .../Files/DefaultFileHashCalculator.cs | 2 +- .../Files/DefaultFileUniqueIdGenerator.cs | 2 +- .../FileHashDuplicateDetectionProvider.cs | 2 +- .../Files/FileInfoCheckProvider.cs | 2 +- .../Files/FileManager.cs | 8 +++---- .../FileNameDuplicateDetectionProvider.cs | 2 +- .../Repositories/FileContainerRepository.cs | 6 ++--- .../Repositories/FileRepository.cs | 8 +++---- .../Files/FileController.cs | 4 ++-- .../Files/FileIntegrationController.cs | 12 +++++----- .../Repositories/FileContainerRepository.cs | 6 ++--- .../MongoDB/Repositories/FileRepository.cs | 14 +++++------ modules/identity-client/common.props | 9 +++++++ .../identity-client/src/Directory.Build.props | 14 ----------- .../IdentityClientAppService.cs | 2 +- .../IdentityProviderAppService.cs | 2 +- .../IdentityClientEventHandler.cs | 6 ++--- .../AuthenticationSchemeProviderManager.cs | 4 ++-- .../NullExternalLoginEventProvider.cs | 10 ++++---- .../IdentityClientLoginAppService.cs | 2 +- .../OpenIdConnectOptionBuilder.cs | 2 +- .../Saml2/Saml2OptionBuilder.cs | 2 +- .../Saml2AppService.cs | 4 ++-- .../Identity/IdentityClaimMapRunner.cs | 2 +- .../NullIdentityClientRegisterProvider.cs | 8 +++---- .../IdentityClientProviderNameProvider.cs | 2 +- .../Repositories/IdentityClientRepository.cs | 2 +- .../IdentityClientController.cs | 2 +- .../Repositories/IdentityClientRepository.cs | 10 ++++---- modules/identity/common.props | 9 +++++++ modules/identity/src/Directory.Build.props | 14 ----------- .../IdentityRoleV2AppService.cs | 2 +- .../IdentitySettingsManager.cs | 4 ++-- .../IdentityRoleV2Controller.cs | 12 +++++----- .../IdentitySettingsController.cs | 24 +++++++++---------- .../IdentityUserLookupController.cs | 4 ++-- .../IdentityUserV2Controller.cs | 2 +- 81 files changed, 226 insertions(+), 265 deletions(-) delete mode 100644 modules/account/src/Directory.Build.props delete mode 100644 modules/api-keys/src/Directory.Build.props delete mode 100644 modules/dictionary-management/src/Directory.Build.props delete mode 100644 modules/dynamic-permission-management/src/Directory.Build.props delete mode 100644 modules/file-management/src/Directory.Build.props delete mode 100644 modules/identity-client/src/Directory.Build.props delete mode 100644 modules/identity/src/Directory.Build.props diff --git a/host/src/Sample.DbMigrator/DbMigratorHostedService.cs b/host/src/Sample.DbMigrator/DbMigratorHostedService.cs index 2b9f1f3..a9af16f 100644 --- a/host/src/Sample.DbMigrator/DbMigratorHostedService.cs +++ b/host/src/Sample.DbMigrator/DbMigratorHostedService.cs @@ -21,7 +21,7 @@ public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, _configuration = configuration; } - public async Task StartAsync(CancellationToken cancellationToken) + public virtual async Task StartAsync(CancellationToken cancellationToken) { using (var application = await AbpApplicationFactory.CreateAsync(options => { @@ -44,7 +44,7 @@ await application } } - public Task StopAsync(CancellationToken cancellationToken) + public virtual Task StopAsync(CancellationToken cancellationToken) { return Task.CompletedTask; } diff --git a/host/src/Sample.Domain/Data/NullSampleDbSchemaMigrator.cs b/host/src/Sample.Domain/Data/NullSampleDbSchemaMigrator.cs index b9daf03..ceec8b1 100644 --- a/host/src/Sample.Domain/Data/NullSampleDbSchemaMigrator.cs +++ b/host/src/Sample.Domain/Data/NullSampleDbSchemaMigrator.cs @@ -8,7 +8,7 @@ namespace Sample.Data; */ public class NullSampleDbSchemaMigrator : ISampleDbSchemaMigrator, ITransientDependency { - public Task MigrateAsync() + public virtual Task MigrateAsync() { return Task.CompletedTask; } diff --git a/host/src/Sample.Domain/Data/SampleDbMigrationService.cs b/host/src/Sample.Domain/Data/SampleDbMigrationService.cs index 63e55e5..9a606b5 100644 --- a/host/src/Sample.Domain/Data/SampleDbMigrationService.cs +++ b/host/src/Sample.Domain/Data/SampleDbMigrationService.cs @@ -38,7 +38,7 @@ public SampleDbMigrationService( Logger = NullLogger.Instance; } - public async Task MigrateAsync() + public virtual async Task MigrateAsync() { var initialMigrationAdded = AddInitialMigrationIfNotExist(); diff --git a/host/src/Sample.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreSampleDbSchemaMigrator.cs b/host/src/Sample.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreSampleDbSchemaMigrator.cs index 498f3fd..1dea0b1 100644 --- a/host/src/Sample.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreSampleDbSchemaMigrator.cs +++ b/host/src/Sample.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreSampleDbSchemaMigrator.cs @@ -18,7 +18,7 @@ public EntityFrameworkCoreSampleDbSchemaMigrator( _serviceProvider = serviceProvider; } - public async Task MigrateAsync() + public virtual async Task MigrateAsync() { /* We intentionally resolving the SampleDbContext * from IServiceProvider (instead of directly injecting it) diff --git a/modules/account/common.props b/modules/account/common.props index 0e74c87..8b1a412 100644 --- a/modules/account/common.props +++ b/modules/account/common.props @@ -5,6 +5,15 @@ Passingwind.Abp.Account an abp module that provider account service, such as login, 2fa, account settings. abp-module + 0.2.0 + 0.2.9 + + + True + \ + + + diff --git a/modules/account/src/Directory.Build.props b/modules/account/src/Directory.Build.props deleted file mode 100644 index cbdccde..0000000 --- a/modules/account/src/Directory.Build.props +++ /dev/null @@ -1,14 +0,0 @@ - - - 0.2.0 - 0.2.8 - - - - - True - \ - - - - diff --git a/modules/account/src/Passingwind.Abp.Account.Application/AccountImpersonationAppService.cs b/modules/account/src/Passingwind.Abp.Account.Application/AccountImpersonationAppService.cs index 612054e..2c56069 100644 --- a/modules/account/src/Passingwind.Abp.Account.Application/AccountImpersonationAppService.cs +++ b/modules/account/src/Passingwind.Abp.Account.Application/AccountImpersonationAppService.cs @@ -57,7 +57,7 @@ public virtual async Task LoginAsync(Guid userId) await ImpersonateLoginAsync(user); } - public async Task LinkLoginAsync(Guid userId) + public virtual async Task LinkLoginAsync(Guid userId) { await IdentityOptions.SetAsync(); diff --git a/modules/account/src/Passingwind.Abp.Account.Application/AccountTfaAppService.cs b/modules/account/src/Passingwind.Abp.Account.Application/AccountTfaAppService.cs index b9c3d83..f62d024 100644 --- a/modules/account/src/Passingwind.Abp.Account.Application/AccountTfaAppService.cs +++ b/modules/account/src/Passingwind.Abp.Account.Application/AccountTfaAppService.cs @@ -25,7 +25,6 @@ public class AccountTfaAppService : AccountAppBaseService, IAccountTfaAppService protected IdentityUserManager UserManager { get; } protected IdentitySecurityLogManager SecurityLogManager { get; } protected IOptions IdentityOptions { get; } - protected IAccountTwoFactorTokenSender AccountTwoFactorTokenSender { get; } protected IdentityUserTwoFactorManager UserTwoFactorManager { get; } protected IOptions UserTokenOptions { get; } @@ -34,7 +33,6 @@ public AccountTfaAppService( IdentityUserManager userManager, IdentitySecurityLogManager securityLogManager, IOptions identityOptions, - IAccountTwoFactorTokenSender accountTwoFactorTokenSender, IdentityUserTwoFactorManager userTwoFactorManager, IOptions userTokenOptions) { @@ -42,7 +40,6 @@ public AccountTfaAppService( UserManager = userManager; SecurityLogManager = securityLogManager; IdentityOptions = identityOptions; - AccountTwoFactorTokenSender = accountTwoFactorTokenSender; UserTwoFactorManager = userTwoFactorManager; UserTokenOptions = userTokenOptions; } @@ -362,7 +359,7 @@ public virtual async Task EnabledPhoneNumberTokenProviderAsync() await UserTwoFactorManager.SetPhoneNumberTokenEnabledAsync(user, true); } - public async Task DisabledEmailTokenProviderAsync() + public virtual async Task DisabledEmailTokenProviderAsync() { await IdentityOptions.SetAsync(); @@ -382,7 +379,7 @@ public async Task DisabledEmailTokenProviderAsync() } } - public async Task DisabledPhoneNumberTokenProviderAsync() + public virtual async Task DisabledPhoneNumberTokenProviderAsync() { await IdentityOptions.SetAsync(); diff --git a/modules/account/src/Passingwind.Abp.Account.Domain/Settings/AccountSettingsManager.cs b/modules/account/src/Passingwind.Abp.Account.Domain/Settings/AccountSettingsManager.cs index a9140ed..fd31427 100644 --- a/modules/account/src/Passingwind.Abp.Account.Domain/Settings/AccountSettingsManager.cs +++ b/modules/account/src/Passingwind.Abp.Account.Domain/Settings/AccountSettingsManager.cs @@ -116,7 +116,7 @@ public virtual async Task SetSecurityLogsSettingsAsync(AccountSecurityLogsSettin await SetSettingValueAsync(AccountSettingNames.SecurityLogs.AllowUserDelete, settings.AllowUserDelete); } - public async Task GetExternalLoginSettingsAsync(CancellationToken cancellationToken = default) + public virtual async Task GetExternalLoginSettingsAsync(CancellationToken cancellationToken = default) { return new AccountExternalLoginSettings { @@ -125,7 +125,7 @@ public async Task GetExternalLoginSettingsAsync(Ca }; } - public async Task SetExternalLoginSettingsAsync(AccountExternalLoginSettings settings, CancellationToken cancellationToken = default) + public virtual async Task SetExternalLoginSettingsAsync(AccountExternalLoginSettings settings, CancellationToken cancellationToken = default) { await SetSettingValueAsync(AccountSettingNames.ExternalLogin.AutoCreateUser, settings.AutoCreateUser); await SetSettingValueAsync(AccountSettingNames.ExternalLogin.BypassTwofactory, settings.BypassTwofactory); diff --git a/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountAdminSettingsController.cs b/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountAdminSettingsController.cs index 2070f9a..a2834ae 100644 --- a/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountAdminSettingsController.cs +++ b/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountAdminSettingsController.cs @@ -16,61 +16,61 @@ public AccountAdminSettingsController(IAccountAdminSettingsAppService service) } [HttpGet] - public Task GetAsync() + public virtual Task GetAsync() { return _service.GetAsync(); } [HttpGet("captcha")] - public Task GetCaptchaAsync() + public virtual Task GetCaptchaAsync() { return _service.GetCaptchaAsync(); } [HttpGet("external-login")] - public Task GetExternalLoginAsync() + public virtual Task GetExternalLoginAsync() { return _service.GetExternalLoginAsync(); } [HttpGet("general")] - public Task GetGeneralAsync() + public virtual Task GetGeneralAsync() { return _service.GetGeneralAsync(); } [HttpGet("recaptcha")] - public Task GetRecaptchaAsync() + public virtual Task GetRecaptchaAsync() { return _service.GetRecaptchaAsync(); } [HttpPut] - public Task UpdateAsync(AccountAdminSettingsDto input) + public virtual Task UpdateAsync(AccountAdminSettingsDto input) { return _service.UpdateAsync(input); } [HttpPut("captcha")] - public Task UpdateCaptchaAsync(AccountCaptchaSettingsDto input) + public virtual Task UpdateCaptchaAsync(AccountCaptchaSettingsDto input) { return _service.UpdateCaptchaAsync(input); } [HttpPut("external-login")] - public Task UpdateExternalLoginAsync(AccountExternalLoginSettingsDto input) + public virtual Task UpdateExternalLoginAsync(AccountExternalLoginSettingsDto input) { return _service.UpdateExternalLoginAsync(input); } [HttpPut("general")] - public Task UpdateGeneralAsync(AccountGeneralSettingsDto input) + public virtual Task UpdateGeneralAsync(AccountGeneralSettingsDto input) { return _service.UpdateGeneralAsync(input); } [HttpPut("recaptcha")] - public Task UpdateRecaptchaAsync(AccountRecaptchaSettingsDto input) + public virtual Task UpdateRecaptchaAsync(AccountRecaptchaSettingsDto input) { return _service.UpdateRecaptchaAsync(input); } diff --git a/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountImpersonationController.cs b/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountImpersonationController.cs index 2e28aca..217fad6 100644 --- a/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountImpersonationController.cs +++ b/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountImpersonationController.cs @@ -26,7 +26,7 @@ public virtual Task LoginAsync(Guid userId) /// [HttpPost("{userId}/link-login")] - public Task LinkLoginAsync(Guid userId) + public virtual Task LinkLoginAsync(Guid userId) { return _service.LinkLoginAsync(userId); } diff --git a/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountTfaController.cs b/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountTfaController.cs index 7325a80..055b1a2 100644 --- a/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountTfaController.cs +++ b/modules/account/src/Passingwind.Abp.Account.HttpApi/AccountTfaController.cs @@ -101,13 +101,13 @@ public virtual Task DisabledPhoneNumberTokenProviderAsync() } [HttpPut("preferred-provider")] - public Task UpdatePreferredProviderAsync(AccountUpdatePreferredProviderDto input) + public virtual Task UpdatePreferredProviderAsync(AccountUpdatePreferredProviderDto input) { return TfaAppService.UpdatePreferredProviderAsync(input); } [HttpGet("preferred-provider")] - public Task GetPreferredProviderAsync() + public virtual Task GetPreferredProviderAsync() { return TfaAppService.GetPreferredProviderAsync(); } diff --git a/modules/api-keys/common.props b/modules/api-keys/common.props index 49d3279..dc8a22d 100644 --- a/modules/api-keys/common.props +++ b/modules/api-keys/common.props @@ -5,6 +5,15 @@ Passingwind.Abp.ApiKey an abp module that provider api key authentication and key management. abp-module, apikey + 0.2.0 + 0.2.2 + + + True + \ + + + diff --git a/modules/api-keys/src/Directory.Build.props b/modules/api-keys/src/Directory.Build.props deleted file mode 100644 index 09c8d69..0000000 --- a/modules/api-keys/src/Directory.Build.props +++ /dev/null @@ -1,14 +0,0 @@ - - - 0.2.0 - 0.2.1 - - - - - True - \ - - - - diff --git a/modules/api-keys/src/Passingwind.Abp.ApiKey.EntityFrameworkCore/EntityFrameworkCore/Repositories/ApiKeyRecordRepository.cs b/modules/api-keys/src/Passingwind.Abp.ApiKey.EntityFrameworkCore/EntityFrameworkCore/Repositories/ApiKeyRecordRepository.cs index 550e80a..88ba496 100644 --- a/modules/api-keys/src/Passingwind.Abp.ApiKey.EntityFrameworkCore/EntityFrameworkCore/Repositories/ApiKeyRecordRepository.cs +++ b/modules/api-keys/src/Passingwind.Abp.ApiKey.EntityFrameworkCore/EntityFrameworkCore/Repositories/ApiKeyRecordRepository.cs @@ -16,7 +16,7 @@ public ApiKeyRecordRepository(IDbContextProvider dbContextProvi { } - public async Task FindBySecretAsync(string value, CancellationToken cancellationToken = default) + public virtual async Task FindBySecretAsync(string value, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -24,7 +24,7 @@ public ApiKeyRecordRepository(IDbContextProvider dbContextProvi .FirstOrDefaultAsync(x => x.Secret == value, cancellationToken); } - public async Task GetCountAsync(string? filter = null, Guid? userId = null, CancellationToken cancellationToken = default) + public virtual async Task GetCountAsync(string? filter = null, Guid? userId = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -34,7 +34,7 @@ public async Task GetCountAsync(string? filter = null, Guid? userId = null .LongCountAsync(cancellationToken); } - public async Task> GetListAsync(string? filter = null, Guid? userId = null, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetListAsync(string? filter = null, Guid? userId = null, bool includeDetails = false, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -44,7 +44,7 @@ public async Task> GetListAsync(string? filter = null, Guid? .ToListAsync(cancellationToken); } - public async Task> GetPagedListAsync(int skipCount, int maxResultCount, string? filter = null, Guid? userId = null, string? sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetPagedListAsync(int skipCount, int maxResultCount, string? filter = null, Guid? userId = null, string? sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); diff --git a/modules/api-keys/src/Passingwind.Abp.ApiKey.MongoDB/MongoDB/Repositories/ApiKeyRecordRepository.cs b/modules/api-keys/src/Passingwind.Abp.ApiKey.MongoDB/MongoDB/Repositories/ApiKeyRecordRepository.cs index b7e732b..d591045 100644 --- a/modules/api-keys/src/Passingwind.Abp.ApiKey.MongoDB/MongoDB/Repositories/ApiKeyRecordRepository.cs +++ b/modules/api-keys/src/Passingwind.Abp.ApiKey.MongoDB/MongoDB/Repositories/ApiKeyRecordRepository.cs @@ -17,7 +17,7 @@ public ApiKeyRecordRepository(IMongoDbContextProvider dbCo { } - public async Task FindBySecretAsync(string value, CancellationToken cancellationToken = default) + public virtual async Task FindBySecretAsync(string value, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -25,7 +25,7 @@ public ApiKeyRecordRepository(IMongoDbContextProvider dbCo .FirstOrDefaultAsync(x => x.Secret == value, cancellationToken); } - public async Task GetCountAsync(string? filter = null, Guid? userId = null, CancellationToken cancellationToken = default) + public virtual async Task GetCountAsync(string? filter = null, Guid? userId = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -36,7 +36,7 @@ public async Task GetCountAsync(string? filter = null, Guid? userId = null .LongCountAsync(cancellationToken); } - public async Task> GetListAsync(string? filter = null, Guid? userId = null, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetListAsync(string? filter = null, Guid? userId = null, bool includeDetails = false, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -47,7 +47,7 @@ public async Task> GetListAsync(string? filter = null, Guid? .ToListAsync(cancellationToken); } - public async Task> GetPagedListAsync(int skipCount, int maxResultCount, string? filter = null, Guid? userId = null, string? sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetPagedListAsync(int skipCount, int maxResultCount, string? filter = null, Guid? userId = null, string? sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); diff --git a/modules/common.props b/modules/common.props index e5b91c3..d814fb4 100644 --- a/modules/common.props +++ b/modules/common.props @@ -1,11 +1,11 @@  latest - 0.1.0 $(Version) $(Version) $(NoWarn);CS1591 - + + true Passingwind Passingwind https://github.com/jxnkwlp/abp-modules diff --git a/modules/dictionary-management/common.props b/modules/dictionary-management/common.props index 201f0a1..d7bec34 100644 --- a/modules/dictionary-management/common.props +++ b/modules/dictionary-management/common.props @@ -2,10 +2,19 @@ - + Passingwind.Abp.DictionaryManagement an abp module that provider dynamic dictionary management service abp-module + 0.2.0 + 0.2.1 + + + True + \ + + + diff --git a/modules/dictionary-management/src/Directory.Build.props b/modules/dictionary-management/src/Directory.Build.props deleted file mode 100644 index b3da706..0000000 --- a/modules/dictionary-management/src/Directory.Build.props +++ /dev/null @@ -1,14 +0,0 @@ - - - 0.2.0 - 0.2.0 - - - - - True - \ - - - - diff --git a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryAppService.cs b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryAppService.cs index ea1dc3c..1722080 100644 --- a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryAppService.cs +++ b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryAppService.cs @@ -16,7 +16,7 @@ public DictionaryAppService(IDictionaryGroupRepository dictionaryGroupRepository _dictionaryItemRepository = dictionaryItemRepository; } - public async Task GetAsync(string name) + public virtual async Task GetAsync(string name) { var item = await _dictionaryItemRepository.GetByNameAsync(name); @@ -35,7 +35,7 @@ public async Task GetAsync(string name) return ObjectMapper.Map(item); } - public async Task GetListByGroupAsync(string groupName) + public virtual async Task GetListByGroupAsync(string groupName) { var group = await _dictionaryGroupRepository.GetByNameAsync(groupName); diff --git a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryGroupAppService.cs b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryGroupAppService.cs index 9a316a6..82a393f 100644 --- a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryGroupAppService.cs +++ b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryGroupAppService.cs @@ -18,7 +18,7 @@ public DictionaryGroupAppService(IDictionaryGroupRepository dictionaryGroupRepos _dictionaryGroupRepository = dictionaryGroupRepository; } - public async Task> GetAllListAsync() + public virtual async Task> GetAllListAsync() { var list = await _dictionaryGroupRepository.GetListAsync(); diff --git a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryItemAppService.cs b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryItemAppService.cs index e683895..78fc1f2 100644 --- a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryItemAppService.cs +++ b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.Application/Dictionaries/DictionaryItemAppService.cs @@ -20,7 +20,7 @@ public DictionaryItemAppService(IDictionaryItemRepository dictionaryItemReposito _dictionaryGroupRepository = dictionaryGroupRepository; } - public async Task> GetAllListAsync(DictionaryItemListRequestDto input) + public virtual async Task> GetAllListAsync(DictionaryItemListRequestDto input) { var list = await _dictionaryItemRepository.GetListAsync(filter: input.Filter, groupName: input.GroupName, sorting: nameof(DictionaryItem.Name)); diff --git a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DictionaryGroupRepository.cs b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DictionaryGroupRepository.cs index 3a165d9..5fe66e8 100644 --- a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DictionaryGroupRepository.cs +++ b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DictionaryGroupRepository.cs @@ -18,14 +18,14 @@ public DictionaryGroupRepository(IDbContextProvider FindByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(string name, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); return await dbset.FirstOrDefaultAsync(x => x.Name == name, cancellationToken); } - public async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -47,7 +47,7 @@ public virtual async Task GetCountAsync(string? filter = null, string? par .LongCountAsync(cancellationToken); } - public async Task> GetListAsync(string? filter = null, string? parentName = null, bool includeDetails = false, string? sorting = null, CancellationToken cancellationToken = default) + public virtual async Task> GetListAsync(string? filter = null, string? parentName = null, bool includeDetails = false, string? sorting = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -70,7 +70,7 @@ public virtual async Task> GetPagedListAsync(int skipCount .ToListAsync(cancellationToken); } - public async Task IsNameExistsAsync(string name, IEnumerable? excludeIds = null, CancellationToken cancellationToken = default) + public virtual async Task IsNameExistsAsync(string name, IEnumerable? excludeIds = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); diff --git a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DictionaryItemRepository.cs b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DictionaryItemRepository.cs index e426283..e6652c9 100644 --- a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DictionaryItemRepository.cs +++ b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DictionaryItemRepository.cs @@ -18,14 +18,14 @@ public DictionaryItemRepository(IDbContextProvider FindByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(string name, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); return await dbset.FirstOrDefaultAsync(x => x.Name == name, cancellationToken); } - public async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -73,7 +73,7 @@ public virtual async Task> GetPagedListAsync(int skipCount, .ToListAsync(cancellationToken); } - public async Task IsNameExistsAsync(string name, IEnumerable? excludeIds = null, CancellationToken cancellationToken = default) + public virtual async Task IsNameExistsAsync(string name, IEnumerable? excludeIds = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); diff --git a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.MongoDB/MongoDB/Repositories/DictionaryGroupRepository.cs b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.MongoDB/MongoDB/Repositories/DictionaryGroupRepository.cs index 1a233f4..15dc89c 100644 --- a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.MongoDB/MongoDB/Repositories/DictionaryGroupRepository.cs +++ b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.MongoDB/MongoDB/Repositories/DictionaryGroupRepository.cs @@ -19,14 +19,14 @@ public DictionaryGroupRepository(IMongoDbContextProvider FindByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(string name, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); return await query.FirstOrDefaultAsync(x => x.Name == name, cancellationToken); } - public async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -38,7 +38,7 @@ public async Task GetByNameAsync(string name, CancellationToken return entity; } - public async Task GetCountAsync(string? filter = null, string? parentName = null, CancellationToken cancellationToken = default) + public virtual async Task GetCountAsync(string? filter = null, string? parentName = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -49,7 +49,7 @@ public async Task GetCountAsync(string? filter = null, string? parentName .LongCountAsync(cancellationToken); } - public async Task> GetListAsync(string? filter = null, string? parentName = null, bool includeDetails = false, string? sorting = null, CancellationToken cancellationToken = default) + public virtual async Task> GetListAsync(string? filter = null, string? parentName = null, bool includeDetails = false, string? sorting = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -61,7 +61,7 @@ public async Task> GetListAsync(string? filter = null, str .ToListAsync(cancellationToken); } - public async Task> GetPagedListAsync(int skipCount, int maxResultCount, string? filter = null, string? parentName = null, string? sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetPagedListAsync(int skipCount, int maxResultCount, string? filter = null, string? parentName = null, string? sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -74,7 +74,7 @@ public async Task> GetPagedListAsync(int skipCount, int ma .ToListAsync(cancellationToken); } - public async Task IsNameExistsAsync(string name, IEnumerable? excludeIds = null, CancellationToken cancellationToken = default) + public virtual async Task IsNameExistsAsync(string name, IEnumerable? excludeIds = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); diff --git a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.MongoDB/MongoDB/Repositories/DictionaryItemRepository.cs b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.MongoDB/MongoDB/Repositories/DictionaryItemRepository.cs index dcb1f02..2c9cfdc 100644 --- a/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.MongoDB/MongoDB/Repositories/DictionaryItemRepository.cs +++ b/modules/dictionary-management/src/Passingwind.Abp.DictionaryManagement.MongoDB/MongoDB/Repositories/DictionaryItemRepository.cs @@ -19,14 +19,14 @@ public DictionaryItemRepository(IMongoDbContextProvider FindByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(string name, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); return await query.FirstOrDefaultAsync(x => x.Name == name, cancellationToken); } - public async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -77,7 +77,7 @@ public virtual async Task> GetPagedListAsync(int skipCount, .ToListAsync(cancellationToken); } - public async Task IsNameExistsAsync(string name, IEnumerable? excludeIds = null, CancellationToken cancellationToken = default) + public virtual async Task IsNameExistsAsync(string name, IEnumerable? excludeIds = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); diff --git a/modules/dynamic-permission-management/common.props b/modules/dynamic-permission-management/common.props index aa2cb1c..5ed3269 100644 --- a/modules/dynamic-permission-management/common.props +++ b/modules/dynamic-permission-management/common.props @@ -3,10 +3,18 @@ - 0.2.0 Passingwind.Abp.DynamicPermissionManagement an abp module that provider dynamic permission management service abp-module + 0.2.0 + 0.2.1 + false + + + True + \ + + diff --git a/modules/dynamic-permission-management/src/Directory.Build.props b/modules/dynamic-permission-management/src/Directory.Build.props deleted file mode 100644 index b3da706..0000000 --- a/modules/dynamic-permission-management/src/Directory.Build.props +++ /dev/null @@ -1,14 +0,0 @@ - - - 0.2.0 - 0.2.0 - - - - - True - \ - - - - diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Application/Permissions/DynamicPermissionDefinitionAppService.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Application/Permissions/DynamicPermissionDefinitionAppService.cs index 23b340f..2c3c764 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Application/Permissions/DynamicPermissionDefinitionAppService.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Application/Permissions/DynamicPermissionDefinitionAppService.cs @@ -17,7 +17,7 @@ public DynamicPermissionDefinitionAppService(IDynamicPermissionDefinitionReposit _permissionDefinitionRepository = permissionDefinitionRepository; } - public async Task> GetAllListAsync(DynamicPermissionDefinitionListRequestDto input) + public virtual async Task> GetAllListAsync(DynamicPermissionDefinitionListRequestDto input) { var list = await _permissionDefinitionRepository.GetListAsync(); diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Application/Permissions/DynamicPermissionGroupDefinitionAppService.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Application/Permissions/DynamicPermissionGroupDefinitionAppService.cs index c392494..23fe484 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Application/Permissions/DynamicPermissionGroupDefinitionAppService.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Application/Permissions/DynamicPermissionGroupDefinitionAppService.cs @@ -19,7 +19,7 @@ public DynamicPermissionGroupDefinitionAppService(IDynamicPermissionGroupDefinit _dynamicPermissionDefinitionRepository = dynamicPermissionDefinitionRepository; } - public async Task> GetAllListAsync() + public virtual async Task> GetAllListAsync() { var list = await _permissionGroupDefinitionRepository.GetListAsync(); diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Domain/Data/PermissionDefinitionDataSeedContributor.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Domain/Data/PermissionDefinitionDataSeedContributor.cs index e9ce181..a50697c 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Domain/Data/PermissionDefinitionDataSeedContributor.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Domain/Data/PermissionDefinitionDataSeedContributor.cs @@ -14,7 +14,7 @@ public PermissionDefinitionDataSeedContributor(DynamicPermissionManager dynamicP DynamicPermissionManager = dynamicPermissionManager; } - public async Task SeedAsync(DataSeedContext context) + public virtual async Task SeedAsync(DataSeedContext context) { await DynamicPermissionManager.InitialGroupDefinitionsToPermissionAsync(); await DynamicPermissionManager.InitialDefinitionsToPermissionAsync(); diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Domain/EventHandlers/DynamicPermissionDefinitionEventHander.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Domain/EventHandlers/DynamicPermissionDefinitionEventHander.cs index 4cce18d..d1d6a43 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Domain/EventHandlers/DynamicPermissionDefinitionEventHander.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.Domain/EventHandlers/DynamicPermissionDefinitionEventHander.cs @@ -41,7 +41,7 @@ public DynamicPermissionDefinitionEventHander( /// DynamicPermissionDefinition Created /// /// - public async Task HandleEventAsync(EntityCreatedEventData eventData) + public virtual async Task HandleEventAsync(EntityCreatedEventData eventData) { var definition = eventData.Entity; var group = await _permissionGroupDefinitionRepository.FindAsync(definition.GroupId); @@ -74,7 +74,7 @@ public async Task HandleEventAsync(EntityCreatedEventData /// - public async Task HandleEventAsync(EntityDeletedEventData eventData) + public virtual async Task HandleEventAsync(EntityDeletedEventData eventData) { var entity = eventData.Entity; @@ -87,7 +87,7 @@ public async Task HandleEventAsync(EntityDeletedEventData /// - public async Task HandleEventAsync(EntityUpdatedEventData eventData) + public virtual async Task HandleEventAsync(EntityUpdatedEventData eventData) { var entity = eventData.Entity; @@ -106,7 +106,7 @@ public async Task HandleEventAsync(EntityUpdatedEventData /// - public async Task HandleEventAsync(EntityUpdatedEventData eventData) + public virtual async Task HandleEventAsync(EntityUpdatedEventData eventData) { var entity = eventData.Entity; @@ -126,7 +126,7 @@ public async Task HandleEventAsync(EntityUpdatedEventData /// - public async Task HandleEventAsync(EntityDeletedEventData eventData) + public virtual async Task HandleEventAsync(EntityDeletedEventData eventData) { var entity = eventData.Entity; @@ -139,7 +139,7 @@ public async Task HandleEventAsync(EntityDeletedEventData /// - public async Task HandleEventAsync(DynamicPermissionGroupDefinitionNameChangedEto eventData) + public virtual async Task HandleEventAsync(DynamicPermissionGroupDefinitionNameChangedEto eventData) { await _dynamicPermissionManager.ChangePermissionGroupDefinitionNameAsync(eventData.OldName, eventData.Name, eventData.Entity); diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DynamicPermissionDefinitionRepository.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DynamicPermissionDefinitionRepository.cs index 5b223e5..f09e0d4 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DynamicPermissionDefinitionRepository.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DynamicPermissionDefinitionRepository.cs @@ -52,7 +52,7 @@ public virtual async Task> GetPagedListAsync(i .ToListAsync(cancellationToken); } - public async Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) + public virtual async Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DynamicPermissionGroupDefinitionRepository.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DynamicPermissionGroupDefinitionRepository.cs index 4b06b8b..8ccd08d 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DynamicPermissionGroupDefinitionRepository.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/DynamicPermissionGroupDefinitionRepository.cs @@ -46,7 +46,7 @@ public virtual async Task> GetPagedListAs .ToListAsync(cancellationToken); } - public async Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) + public virtual async Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.HttpApi/Permissions/DynamicPermissionDefinitionController.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.HttpApi/Permissions/DynamicPermissionDefinitionController.cs index 8adb8f5..1347757 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.HttpApi/Permissions/DynamicPermissionDefinitionController.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.HttpApi/Permissions/DynamicPermissionDefinitionController.cs @@ -49,7 +49,7 @@ public virtual Task DeleteAsync(Guid id) } [HttpGet("all")] - public Task> GetAllListAsync(DynamicPermissionDefinitionListRequestDto input) + public virtual Task> GetAllListAsync(DynamicPermissionDefinitionListRequestDto input) { return _service.GetAllListAsync(input); } diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.HttpApi/Permissions/DynamicPermissionGroupDefinitionController.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.HttpApi/Permissions/DynamicPermissionGroupDefinitionController.cs index aa6329f..4070088 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.HttpApi/Permissions/DynamicPermissionGroupDefinitionController.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.HttpApi/Permissions/DynamicPermissionGroupDefinitionController.cs @@ -49,7 +49,7 @@ public virtual Task DeleteAsync(Guid id) } [HttpGet("all")] - public Task> GetAllListAsync() + public virtual Task> GetAllListAsync() { return _service.GetAllListAsync(); } diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.MongoDB/MongoDB/Repositories/DynamicPermissionDefinitionRepository.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.MongoDB/MongoDB/Repositories/DynamicPermissionDefinitionRepository.cs index 3f5bf7c..a45d00c 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.MongoDB/MongoDB/Repositories/DynamicPermissionDefinitionRepository.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.MongoDB/MongoDB/Repositories/DynamicPermissionDefinitionRepository.cs @@ -56,7 +56,7 @@ public virtual async Task> GetPagedListAsync(i .ToListAsync(cancellationToken); } - public async Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) + public virtual async Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); diff --git a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.MongoDB/MongoDB/Repositories/DynamicPermissionGroupDefinitionRepository.cs b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.MongoDB/MongoDB/Repositories/DynamicPermissionGroupDefinitionRepository.cs index 7c1eaea..e4eafeb 100644 --- a/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.MongoDB/MongoDB/Repositories/DynamicPermissionGroupDefinitionRepository.cs +++ b/modules/dynamic-permission-management/src/Passingwind.Abp.DynamicPermissionManagement.MongoDB/MongoDB/Repositories/DynamicPermissionGroupDefinitionRepository.cs @@ -51,7 +51,7 @@ public virtual async Task> GetPagedListAs .ToListAsync(cancellationToken); } - public Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) + public virtual Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) { throw new NotImplementedException(); } diff --git a/modules/file-management/common.props b/modules/file-management/common.props index b1d85a2..b110782 100644 --- a/modules/file-management/common.props +++ b/modules/file-management/common.props @@ -1,10 +1,19 @@  - + Passingwind.Abp.FileManagement an abp module that provider file and file container management. abp-module + 0.2.0 + 0.2.2 - + + + + True + \ + + + diff --git a/modules/file-management/src/Directory.Build.props b/modules/file-management/src/Directory.Build.props deleted file mode 100644 index 09c8d69..0000000 --- a/modules/file-management/src/Directory.Build.props +++ /dev/null @@ -1,14 +0,0 @@ - - - 0.2.0 - 0.2.1 - - - - - True - \ - - - - diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Application/Files/FileContainerAppService.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Application/Files/FileContainerAppService.cs index 8987bd3..be913d1 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Application/Files/FileContainerAppService.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Application/Files/FileContainerAppService.cs @@ -35,7 +35,7 @@ public FileContainerAppService( FileManager = fileManager; } - public async Task> GetAllListAsync() + public virtual async Task> GetAllListAsync() { // permission: anyone that get permission can list all or list owners. diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/EventHandler/FileEventHander.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/EventHandler/FileEventHander.cs index 2da5caa..12b2bdd 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/EventHandler/FileEventHander.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/EventHandler/FileEventHander.cs @@ -34,7 +34,7 @@ public virtual async Task HandleEventAsync(EntityCreatedEventData eventDat } [UnitOfWork] - public async Task HandleEventAsync(EntityDeletedEventData eventData) + public virtual async Task HandleEventAsync(EntityDeletedEventData eventData) { var entity = eventData.Entity; diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileBlobContainerProvider.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileBlobContainerProvider.cs index 137582c..c9171d0 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileBlobContainerProvider.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileBlobContainerProvider.cs @@ -18,7 +18,7 @@ public DefaultFileBlobContainerProvider(IBlobContainerFactory blobContainerFacto _options = options.Value; } - public Task GetAsync(FileContainer container, CancellationToken cancellationToken = default) + public virtual Task GetAsync(FileContainer container, CancellationToken cancellationToken = default) { IBlobContainer blobContainer; diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileBlobNameGenerator.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileBlobNameGenerator.cs index a6db79a..141bf80 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileBlobNameGenerator.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileBlobNameGenerator.cs @@ -19,7 +19,7 @@ public DefaultFileBlobNameGenerator(IClock clock, IOptions CreateAsync(Guid containerId, Guid fileId, string uniqueId, string fileName, string mimeType, long length, string hash, CancellationToken cancellationToken = default) + public virtual Task CreateAsync(Guid containerId, Guid fileId, string uniqueId, string fileName, string mimeType, long length, string hash, CancellationToken cancellationToken = default) { var now = _clock.Now; var directorySeparator = _options.BlobDirectorySeparator; diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileHashCalculator.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileHashCalculator.cs index ef7b9c1..bc1cd09 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileHashCalculator.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileHashCalculator.cs @@ -8,7 +8,7 @@ namespace Passingwind.Abp.FileManagement.Files; public class DefaultFileHashCalculator : IFileHashCalculator { - public Task GetAsync(byte[] bytes, CancellationToken cancellationToken = default) + public virtual Task GetAsync(byte[] bytes, CancellationToken cancellationToken = default) { var hash = GetMd5(bytes); diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileUniqueIdGenerator.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileUniqueIdGenerator.cs index 7e1d2c6..2cfb5d9 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileUniqueIdGenerator.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/DefaultFileUniqueIdGenerator.cs @@ -7,7 +7,7 @@ namespace Passingwind.Abp.FileManagement.Files; public class DefaultFileUniqueIdGenerator : IFileUniqueIdGenerator, ISingletonDependency { - public Task CreateAsync(FileContainer fileContainer, Guid fileId, CancellationToken cancellationToken = default) + public virtual Task CreateAsync(FileContainer fileContainer, Guid fileId, CancellationToken cancellationToken = default) { // return Nanoid.Nanoid.GenerateAsync(size: 32); return Task.FromResult(fileId.ToString("N")); diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileHashDuplicateDetectionProvider.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileHashDuplicateDetectionProvider.cs index 69b710a..c7f4e29 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileHashDuplicateDetectionProvider.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileHashDuplicateDetectionProvider.cs @@ -9,7 +9,7 @@ // _fileRepository = fileRepository; // } -// public async Task IsExistsAsync(FileContainer fileContainer, File file, CancellationToken cancellationToken = default) +// public virtual async Task IsExistsAsync(FileContainer fileContainer, File file, CancellationToken cancellationToken = default) // { // return await _fileRepository.AnyAsync(x => x.Id != file.Id // && x.Hash == file.Hash diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileInfoCheckProvider.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileInfoCheckProvider.cs index daa1c2b..6cb2c32 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileInfoCheckProvider.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileInfoCheckProvider.cs @@ -20,7 +20,7 @@ public FileInfoCheckProvider(IFileRepository fileRepository, IFileContainerRepos _fileDuplicateDetectionProvider = fileDuplicateDetectionProvider; } - public async Task CheckAsync(FileContainer container, File file, CancellationToken cancellationToken = default) + public virtual async Task CheckAsync(FileContainer container, File file, CancellationToken cancellationToken = default) { if (!file.IsDirectory) { diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileManager.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileManager.cs index 935f134..75099d2 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileManager.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileManager.cs @@ -275,7 +275,7 @@ public virtual async Task CreateDirectoryAsync(FileContainer container, st return file; } - public Task UpdateFileAsync(FileContainer container, File file, byte[] bytes, CancellationToken cancellationToken = default) + public virtual Task UpdateFileAsync(FileContainer container, File file, byte[] bytes, CancellationToken cancellationToken = default) { if (container is null) { @@ -432,21 +432,21 @@ public virtual async Task ClearContainerFilesAsync(FileContainer container, Canc } } - public async Task GetFileBytesByFileIdAsync(string containerName, Guid id, CancellationToken cancellationToken = default) + public virtual async Task GetFileBytesByFileIdAsync(string containerName, Guid id, CancellationToken cancellationToken = default) { var container = await FileContainerRepository.GetByNameAsync(containerName, cancellationToken); var file = await FileRepository.GetAsync(id, cancellationToken: cancellationToken); return await GetFileBytesAsync(container, file, cancellationToken); } - public async Task GetFileSteamByFileIdAsync(string containerName, Guid id, CancellationToken cancellationToken = default) + public virtual async Task GetFileSteamByFileIdAsync(string containerName, Guid id, CancellationToken cancellationToken = default) { var container = await FileContainerRepository.GetByNameAsync(containerName, cancellationToken); var file = await FileRepository.GetAsync(id, cancellationToken: cancellationToken); return await GetFileSteamAsync(container, file, cancellationToken); } - public async Task GetByIdAsync(string containerName, Guid id, CancellationToken cancellationToken = default) + public virtual async Task GetByIdAsync(string containerName, Guid id, CancellationToken cancellationToken = default) { return await FileRepository.GetAsync(id, cancellationToken: cancellationToken); } diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileNameDuplicateDetectionProvider.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileNameDuplicateDetectionProvider.cs index 4586e3c..42e2f88 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileNameDuplicateDetectionProvider.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.Domain/Files/FileNameDuplicateDetectionProvider.cs @@ -13,7 +13,7 @@ public FileNameDuplicateDetectionProvider(IFileRepository fileRepository) _fileRepository = fileRepository; } - public async Task IsExistsAsync(FileContainer fileContainer, File file, CancellationToken cancellationToken = default) + public virtual async Task IsExistsAsync(FileContainer fileContainer, File file, CancellationToken cancellationToken = default) { return await _fileRepository.AnyAsync(x => x.Id != file.Id && x.FileName == file.FileName diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/FileContainerRepository.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/FileContainerRepository.cs index 027a64a..cf7622f 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/FileContainerRepository.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/FileContainerRepository.cs @@ -18,7 +18,7 @@ public FileContainerRepository(IDbContextProvider dbCon { } - public async Task CheckExistsAsync(FileContainer fileContainer, CancellationToken cancellationToken = default) + public virtual async Task CheckExistsAsync(FileContainer fileContainer, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -35,14 +35,14 @@ public virtual async Task GetCountAsync(string? filter = null, Guid? userI .LongCountAsync(cancellationToken); } - public async Task FindByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(string name, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); return await dbset.FirstOrDefaultAsync(x => x.Name == name, cancellationToken: cancellationToken); } - public async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/FileRepository.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/FileRepository.cs index 3febf25..b5e3fd3 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/FileRepository.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.EntityFrameworkCore/EntityFrameworkCore/Repositories/FileRepository.cs @@ -18,7 +18,7 @@ public FileRepository(IDbContextProvider dbContextProvi { } - public async Task FindByNameAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -27,7 +27,7 @@ public FileRepository(IDbContextProvider dbContextProvi .FirstOrDefaultAsync(x => x.ContainerId == containerId && x.FileName == fileName, cancellationToken: cancellationToken); } - public async Task GetByNameAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); @@ -60,7 +60,7 @@ public virtual async Task> GetListAsync(string? filter = null, Guid? .ToListAsync(cancellationToken); } - public async Task> GetListByIdsAsync(IEnumerable ids, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetListByIdsAsync(IEnumerable ids, bool includeDetails = false, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); return await dbset.Where(x => ids.Contains(x.Id)).ToListAsync(cancellationToken); @@ -79,7 +79,7 @@ public virtual async Task> GetPagedListAsync(int skipCount, int maxRe .ToListAsync(cancellationToken); } - public async Task IsFileNameExistsAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) + public virtual async Task IsFileNameExistsAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); return await dbset diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.HttpApi/Files/FileController.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.HttpApi/Files/FileController.cs index b8d5495..5a32ab2 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.HttpApi/Files/FileController.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.HttpApi/Files/FileController.cs @@ -82,13 +82,13 @@ public virtual Task DeleteAsync(string containerName, Guid id) } [HttpPut("{containerName}/{id}")] - public Task UpdateAsync(string containerName, Guid id, FileUpdateDto input) + public virtual Task UpdateAsync(string containerName, Guid id, FileUpdateDto input) { return _service.UpdateAsync(containerName, id, input); } [HttpPost("{containerName}/directory")] - public Task CreateDirectoryAsync(string containerName, FileDirectoryCreateDto input) + public virtual Task CreateDirectoryAsync(string containerName, FileDirectoryCreateDto input) { return _service.CreateDirectoryAsync(containerName, input); } diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.HttpApi/Files/FileIntegrationController.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.HttpApi/Files/FileIntegrationController.cs index 036d202..bd29775 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.HttpApi/Files/FileIntegrationController.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.HttpApi/Files/FileIntegrationController.cs @@ -19,32 +19,32 @@ // _fileIntegrationAppService = fileIntegrationAppService; // } -// public Task CreateByBytesAsync(string containerName, FileCreateByBytesDto input) +// public virtual Task CreateByBytesAsync(string containerName, FileCreateByBytesDto input) // { // return _fileIntegrationAppService.CreateByBytesAsync(containerName, input); // } -// public Task CreateByStreamAsync(string containerName, FileCreateByStreamDto input) +// public virtual Task CreateByStreamAsync(string containerName, FileCreateByStreamDto input) // { // return _fileIntegrationAppService.CreateByStreamAsync(containerName, input); // } -// public Task GetAsync(string containerName, Guid id) +// public virtual Task GetAsync(string containerName, Guid id) // { // return _fileIntegrationAppService.GetAsync(containerName, id); // } -// public Task GetBytesAsync(string containerName, Guid id) +// public virtual Task GetBytesAsync(string containerName, Guid id) // { // return _fileIntegrationAppService.GetBytesAsync(containerName, id); // } -// public Task GetContainerAsync(Guid id) +// public virtual Task GetContainerAsync(Guid id) // { // return _fileIntegrationAppService.GetContainerAsync(id); // } -// public Task GetStreamAsync(string containerName, Guid id) +// public virtual Task GetStreamAsync(string containerName, Guid id) // { // return _fileIntegrationAppService.GetStreamAsync(containerName, id); // } diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.MongoDB/MongoDB/Repositories/FileContainerRepository.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.MongoDB/MongoDB/Repositories/FileContainerRepository.cs index f4be2e3..dff3742 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.MongoDB/MongoDB/Repositories/FileContainerRepository.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.MongoDB/MongoDB/Repositories/FileContainerRepository.cs @@ -19,7 +19,7 @@ public FileContainerRepository(IMongoDbContextProvider CheckExistsAsync(FileContainer fileContainer, CancellationToken cancellationToken = default) + public virtual async Task CheckExistsAsync(FileContainer fileContainer, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -37,14 +37,14 @@ public virtual async Task GetCountAsync(string? filter = null, Guid? userI .LongCountAsync(cancellationToken); } - public async Task FindByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(string name, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); return await query.FirstOrDefaultAsync(x => x.Name == name, cancellationToken: cancellationToken); } - public async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(string name, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); diff --git a/modules/file-management/src/Passingwind.Abp.FileManagement.MongoDB/MongoDB/Repositories/FileRepository.cs b/modules/file-management/src/Passingwind.Abp.FileManagement.MongoDB/MongoDB/Repositories/FileRepository.cs index 5e38e9a..8d8291c 100644 --- a/modules/file-management/src/Passingwind.Abp.FileManagement.MongoDB/MongoDB/Repositories/FileRepository.cs +++ b/modules/file-management/src/Passingwind.Abp.FileManagement.MongoDB/MongoDB/Repositories/FileRepository.cs @@ -19,7 +19,7 @@ public FileRepository(IMongoDbContextProvider dbCo { } - public async Task FindByNameAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -29,7 +29,7 @@ public FileRepository(IMongoDbContextProvider dbCo .FirstOrDefaultAsync(x => x.ContainerId == containerId && x.FileName == fileName, cancellationToken: cancellationToken); } - public async Task GetByNameAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(Guid containerId, string fileName, Guid? parentId = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -41,7 +41,7 @@ public async Task GetByNameAsync(Guid containerId, string fileName, Guid? return entity ?? throw new EntityNotFoundException(); } - public async Task GetCountAsync(string? filter = null, Guid? containerId = null, Guid? parentId = null, bool? isDirectory = null, CancellationToken cancellationToken = default) + public virtual async Task GetCountAsync(string? filter = null, Guid? containerId = null, Guid? parentId = null, bool? isDirectory = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -54,7 +54,7 @@ public async Task GetCountAsync(string? filter = null, Guid? containerId = .LongCountAsync(cancellationToken); } - public async Task> GetListAsync(string? filter = null, Guid? containerId = null, Guid? parentId = null, bool? isDirectory = null, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetListAsync(string? filter = null, Guid? containerId = null, Guid? parentId = null, bool? isDirectory = null, bool includeDetails = false, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -67,14 +67,14 @@ public async Task> GetListAsync(string? filter = null, Guid? containe .ToListAsync(cancellationToken); } - public async Task> GetListByIdsAsync(IEnumerable ids, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetListByIdsAsync(IEnumerable ids, bool includeDetails = false, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); return await query.Where(x => ids.Contains(x.Id)).ToListAsync(cancellationToken); } - public async Task> GetPagedListAsync(int skipCount, int maxResultCount, string? filter = null, Guid? containerId = null, Guid? parentId = null, bool? isDirectory = null, string? sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) + public virtual async Task> GetPagedListAsync(int skipCount, int maxResultCount, string? filter = null, Guid? containerId = null, Guid? parentId = null, bool? isDirectory = null, string? sorting = null, bool includeDetails = false, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -89,7 +89,7 @@ public async Task> GetPagedListAsync(int skipCount, int maxResultCoun .ToListAsync(cancellationToken); } - public async Task IsFileNameExistsAsync(Guid containerId, string fileName, Guid? parentId, CancellationToken cancellationToken = default) + public virtual async Task IsFileNameExistsAsync(Guid containerId, string fileName, Guid? parentId, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); return await query diff --git a/modules/identity-client/common.props b/modules/identity-client/common.props index 6c0a172..b647f63 100644 --- a/modules/identity-client/common.props +++ b/modules/identity-client/common.props @@ -6,6 +6,15 @@ Passingwind.Abp.IdentityClientManagement an abp module that provider dynamic identity provider, support oidc, saml2 abp, abp-module, OIDC, SAML2 + 0.3.0 + 0.3.4 + + + True + \ + + + diff --git a/modules/identity-client/src/Directory.Build.props b/modules/identity-client/src/Directory.Build.props deleted file mode 100644 index 152f2e7..0000000 --- a/modules/identity-client/src/Directory.Build.props +++ /dev/null @@ -1,14 +0,0 @@ - - - 0.3.0 - 0.3.3 - - - - - True - \ - - - - diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Application/IdentityClientAppService.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Application/IdentityClientAppService.cs index 3b662fc..d7afea8 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Application/IdentityClientAppService.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Application/IdentityClientAppService.cs @@ -147,7 +147,7 @@ public virtual async Task DeleteAsync(Guid id) await _identityClientRepository.DeleteAsync(id); } - public async Task VerifyAsync(Guid id) + public virtual async Task VerifyAsync(Guid id) { try { diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Application/IdentityProviderAppService.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Application/IdentityProviderAppService.cs index 446f8cd..e87340e 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Application/IdentityProviderAppService.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Application/IdentityProviderAppService.cs @@ -19,7 +19,7 @@ public IdentityProviderAppService( } [AllowAnonymous] - public async Task> GetListAsync() + public virtual async Task> GetListAsync() { var list = await IdentityClientRepository.GetListAsync(false); diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/EventHandlers/IdentityClientEventHandler.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/EventHandlers/IdentityClientEventHandler.cs index ae13759..0fa4d90 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/EventHandlers/IdentityClientEventHandler.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/EventHandlers/IdentityClientEventHandler.cs @@ -24,7 +24,7 @@ public IdentityClientEventHandler(ILogger logger, II _identityClientRepository = identityClientRepository; } - public async Task HandleEventAsync(EntityCreatedEto eventData) + public virtual async Task HandleEventAsync(EntityCreatedEto eventData) { var data = eventData.Entity; @@ -40,7 +40,7 @@ public async Task HandleEventAsync(EntityCreatedEto eventData } } - public async Task HandleEventAsync(EntityUpdatedEto eventData) + public virtual async Task HandleEventAsync(EntityUpdatedEto eventData) { var data = eventData.Entity; @@ -59,7 +59,7 @@ public async Task HandleEventAsync(EntityUpdatedEto eventData } } - public async Task HandleEventAsync(EntityDeletedEto eventData) + public virtual async Task HandleEventAsync(EntityDeletedEto eventData) { var data = eventData.Entity; diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Identity/AuthenticationSchemeProviderManager.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Identity/AuthenticationSchemeProviderManager.cs index 298cb73..1116edf 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Identity/AuthenticationSchemeProviderManager.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Identity/AuthenticationSchemeProviderManager.cs @@ -23,7 +23,7 @@ public AuthenticationSchemeProviderManager( AuthenticationSchemeProvider = authenticationSchemeProvider; } - public Task RegisterAsync(string name, string displayName, TOptions options, CancellationToken cancellationToken = default) where TOptions : class + public virtual Task RegisterAsync(string name, string displayName, TOptions options, CancellationToken cancellationToken = default) where TOptions : class { Logger.LogDebug("Try register authentication scheme '{0}', option type '{1}'", name, options.GetType().Name); @@ -48,7 +48,7 @@ public Task RegisterAsync(string name, string displayName, T return Task.CompletedTask; } - public Task UnRegisterAsync(string name, CancellationToken cancellationToken = default) where TOptions : class + public virtual Task UnRegisterAsync(string name, CancellationToken cancellationToken = default) where TOptions : class { Logger.LogInformation("Try unregister authentication scheme '{0}' ", name); diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Identity/NullExternalLoginEventProvider.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Identity/NullExternalLoginEventProvider.cs index 9a10018..dc291a3 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Identity/NullExternalLoginEventProvider.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Identity/NullExternalLoginEventProvider.cs @@ -5,27 +5,27 @@ namespace Passingwind.Abp.IdentityClient.Identity; public class NullExternalLoginEventProvider : IExternalLoginEventProvider, ISingletonDependency { - public Task LoginInfoReceivedAsync(ExternalLoginInfoReceivedContext context) + public virtual Task LoginInfoReceivedAsync(ExternalLoginInfoReceivedContext context) { return Task.CompletedTask; } - public Task MessageReceivedAsync(ExternalLoginMessageReceivedContext context) + public virtual Task MessageReceivedAsync(ExternalLoginMessageReceivedContext context) { return Task.CompletedTask; } - public Task RedirectToIdentityProviderAsync(ExternalLoginRedirectToIdentityProviderContext context) + public virtual Task RedirectToIdentityProviderAsync(ExternalLoginRedirectToIdentityProviderContext context) { return Task.CompletedTask; } - public Task SignInAsync(ExternalLoginSignInContext context) + public virtual Task SignInAsync(ExternalLoginSignInContext context) { return Task.CompletedTask; } - public Task UserSignInAsync(ExternalLoginUserSignInContext context) + public virtual Task UserSignInAsync(ExternalLoginUserSignInContext context) { return Task.CompletedTask; } diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/IdentityClientLoginAppService.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/IdentityClientLoginAppService.cs index 5a5b7fa..2c8d223 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/IdentityClientLoginAppService.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/IdentityClientLoginAppService.cs @@ -25,7 +25,7 @@ public IdentityClientLoginAppService( HttpContext = httpContextAccessor.HttpContext; } - public async Task LoginAsync(string name, string? redirectUrl = null) + public virtual async Task LoginAsync(string name, string? redirectUrl = null) { var identityClient = await IdentityClientRepository.FindByProviderNameAsync(name); diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/OpenIdConnect/OpenIdConnectOptionBuilder.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/OpenIdConnect/OpenIdConnectOptionBuilder.cs index 0cdc351..24a31af 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/OpenIdConnect/OpenIdConnectOptionBuilder.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/OpenIdConnect/OpenIdConnectOptionBuilder.cs @@ -20,7 +20,7 @@ public OpenIdConnectOptionBuilder(IOptions identit IdentityClientProviderOption = identityClientProviderOption.Value; } - public Task GetAsync(string provider, IdentityClientOpenIdConnectConfiguration configuration, CancellationToken cancellationToken = default) + public virtual Task GetAsync(string provider, IdentityClientOpenIdConnectConfiguration configuration, CancellationToken cancellationToken = default) { OpenIdConnectOptions options = new OpenIdConnectOptions { diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Saml2/Saml2OptionBuilder.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Saml2/Saml2OptionBuilder.cs index 52cc1cc..970afbf 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Saml2/Saml2OptionBuilder.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Saml2/Saml2OptionBuilder.cs @@ -22,7 +22,7 @@ public Saml2OptionBuilder(ICertificateLoader certificateLoader, IOptions GetAsync(string provider, IdentityClientSaml2Configuration configuration, CancellationToken cancellationToken = default) + public virtual async Task GetAsync(string provider, IdentityClientSaml2Configuration configuration, CancellationToken cancellationToken = default) { var options = new Saml2Options() { diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Saml2AppService.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Saml2AppService.cs index ad62b1c..648ce79 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Saml2AppService.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.AspNetCore/Saml2AppService.cs @@ -46,7 +46,7 @@ public Saml2AppService( } [AllowAnonymous] - public async Task GetMetadataDescriptorAsync(Uri baseUri, string name) + public virtual async Task GetMetadataDescriptorAsync(Uri baseUri, string name) { var identityClient = await IdentityClientRepository.GetByNameAsync(name); var configuration = IdentityClientConfigurationHelper.ToSaml2Configuration(identityClient.Configurations); @@ -134,7 +134,7 @@ public async Task GetMetadataDescriptorAsync(Uri baseUri, string name) } [Authorize] - public async Task LogoutAsync(string name) + public virtual async Task LogoutAsync(string name) { if (HttpContext == null) throw new ArgumentException(nameof(HttpContext)); diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/Identity/IdentityClaimMapRunner.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/Identity/IdentityClaimMapRunner.cs index ef174dc..1bbe1d9 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/Identity/IdentityClaimMapRunner.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/Identity/IdentityClaimMapRunner.cs @@ -9,7 +9,7 @@ namespace Passingwind.Abp.IdentityClient.Identity; public class IdentityClaimMapRunner : IIdentityClaimMapRunner, ISingletonDependency { - public Task> RunAsync(IEnumerable source, List claimMaps, CancellationToken cancellationToken = default) + public virtual Task> RunAsync(IEnumerable source, List claimMaps, CancellationToken cancellationToken = default) { var cliams = source.ToList(); diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/Identity/NullIdentityClientRegisterProvider.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/Identity/NullIdentityClientRegisterProvider.cs index b7d083d..81061b6 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/Identity/NullIdentityClientRegisterProvider.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/Identity/NullIdentityClientRegisterProvider.cs @@ -6,22 +6,22 @@ namespace Passingwind.Abp.IdentityClient.Identity; public class NullIdentityClientRegisterProvider : IIdentityClientRegisterProvider, ITransientDependency { - public Task RegisterAllAsync(CancellationToken cancellationToken = default) + public virtual Task RegisterAllAsync(CancellationToken cancellationToken = default) { return Task.CompletedTask; } - public Task RegisterAsync(IdentityClient identityClient, CancellationToken cancellationToken = default) + public virtual Task RegisterAsync(IdentityClient identityClient, CancellationToken cancellationToken = default) { return Task.CompletedTask; } - public Task UnregisterAsync(IdentityClient identityClient, CancellationToken cancellationToken = default) + public virtual Task UnregisterAsync(IdentityClient identityClient, CancellationToken cancellationToken = default) { return Task.CompletedTask; } - public Task ValidateAsync(IdentityClient identityClient, CancellationToken cancellationToken = default) + public virtual Task ValidateAsync(IdentityClient identityClient, CancellationToken cancellationToken = default) { return Task.CompletedTask; } diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/IdentityClientProviderNameProvider.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/IdentityClientProviderNameProvider.cs index eac33c0..fcc2654 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/IdentityClientProviderNameProvider.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.Domain/IdentityClientProviderNameProvider.cs @@ -14,7 +14,7 @@ public IdentityClientProviderNameProvider(ITenantStore tenantStore) TenantStore = tenantStore; } - public async Task CreateAsync(IdentityClient identityClient, CancellationToken cancellationToken = default) + public virtual async Task CreateAsync(IdentityClient identityClient, CancellationToken cancellationToken = default) { if (identityClient.TenantId.HasValue) { diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.EntityFrameworkCore/EntityFrameworkCore/Repositories/IdentityClientRepository.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.EntityFrameworkCore/EntityFrameworkCore/Repositories/IdentityClientRepository.cs index 1875c3a..f89b040 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.EntityFrameworkCore/EntityFrameworkCore/Repositories/IdentityClientRepository.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.EntityFrameworkCore/EntityFrameworkCore/Repositories/IdentityClientRepository.cs @@ -52,7 +52,7 @@ public virtual async Task GetByNameAsync(string name, bool inclu return entity; } - public async Task GetByProviderNameAsync(string providerName, bool includeDetails = true, CancellationToken cancellationToken = default) + public virtual async Task GetByProviderNameAsync(string providerName, bool includeDetails = true, CancellationToken cancellationToken = default) { var dbset = await GetDbSetAsync(); diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.HttpApi/IdentityClientController.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.HttpApi/IdentityClientController.cs index 4057b2b..f2f1670 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.HttpApi/IdentityClientController.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.HttpApi/IdentityClientController.cs @@ -49,7 +49,7 @@ public virtual Task DeleteAsync(Guid id) } [HttpPost("{id}/verify")] - public Task VerifyAsync(Guid id) + public virtual Task VerifyAsync(Guid id) { return _service.VerifyAsync(id); } diff --git a/modules/identity-client/src/Passingwind.Abp.IdentityClient.MongoDB/MongoDB/Repositories/IdentityClientRepository.cs b/modules/identity-client/src/Passingwind.Abp.IdentityClient.MongoDB/MongoDB/Repositories/IdentityClientRepository.cs index 80e9bf7..e328a9c 100644 --- a/modules/identity-client/src/Passingwind.Abp.IdentityClient.MongoDB/MongoDB/Repositories/IdentityClientRepository.cs +++ b/modules/identity-client/src/Passingwind.Abp.IdentityClient.MongoDB/MongoDB/Repositories/IdentityClientRepository.cs @@ -18,7 +18,7 @@ public IdentityClientRepository(IMongoDbContextProvider FindByNameAsync(string name, bool includeDetails = true, CancellationToken cancellationToken = default) + public virtual async Task FindByNameAsync(string name, bool includeDetails = true, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -26,14 +26,14 @@ public IdentityClientRepository(IMongoDbContextProvider x.Name == name, cancellationToken: cancellationToken); } - public async Task FindByProviderNameAsync(string providerName, bool includeDetails = true, CancellationToken cancellationToken = default) + public virtual async Task FindByProviderNameAsync(string providerName, bool includeDetails = true, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); return await query .FirstOrDefaultAsync(x => x.ProviderName == providerName, cancellationToken: cancellationToken); } - public async Task GetByNameAsync(string name, bool includeDetails = true, CancellationToken cancellationToken = default) + public virtual async Task GetByNameAsync(string name, bool includeDetails = true, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -46,7 +46,7 @@ public async Task GetByNameAsync(string name, bool includeDetail return entity; } - public async Task GetByProviderNameAsync(string providerName, bool includeDetails = true, CancellationToken cancellationToken = default) + public virtual async Task GetByProviderNameAsync(string providerName, bool includeDetails = true, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); @@ -91,7 +91,7 @@ public virtual async Task> GetPagedListAsync(int skipCount, .ToListAsync(cancellationToken); } - public async Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) + public virtual async Task IsNameExistsAsync(string name, Guid[]? excludeIds = null, CancellationToken cancellationToken = default) { var query = await GetMongoQueryableAsync(); diff --git a/modules/identity/common.props b/modules/identity/common.props index 76a0b49..a266963 100644 --- a/modules/identity/common.props +++ b/modules/identity/common.props @@ -5,6 +5,15 @@ Passingwind.Abp.Identity an abp module that extend identity service, include settings, organization unit. abp-module + 0.2.0 + 0.2.9 + + + True + \ + + + diff --git a/modules/identity/src/Directory.Build.props b/modules/identity/src/Directory.Build.props deleted file mode 100644 index cbdccde..0000000 --- a/modules/identity/src/Directory.Build.props +++ /dev/null @@ -1,14 +0,0 @@ - - - 0.2.0 - 0.2.8 - - - - - True - \ - - - - diff --git a/modules/identity/src/Passingwind.Abp.Identity.Application/IdentityRoleV2AppService.cs b/modules/identity/src/Passingwind.Abp.Identity.Application/IdentityRoleV2AppService.cs index 439b901..392a024 100644 --- a/modules/identity/src/Passingwind.Abp.Identity.Application/IdentityRoleV2AppService.cs +++ b/modules/identity/src/Passingwind.Abp.Identity.Application/IdentityRoleV2AppService.cs @@ -94,7 +94,7 @@ public virtual async Task UpdateClaimAsync(Guid id, IdentityRoleClaimAddOrUpdate await RoleRepository.UpdateAsync(entity); } - public async Task> GetAssignableClaimsAsync() + public virtual async Task> GetAssignableClaimsAsync() { var list = await IdentityClaimTypeRepository.GetListAsync(); diff --git a/modules/identity/src/Passingwind.Abp.Identity.Domain/IdentitySettingsManager.cs b/modules/identity/src/Passingwind.Abp.Identity.Domain/IdentitySettingsManager.cs index 9650a5e..93b41d0 100644 --- a/modules/identity/src/Passingwind.Abp.Identity.Domain/IdentitySettingsManager.cs +++ b/modules/identity/src/Passingwind.Abp.Identity.Domain/IdentitySettingsManager.cs @@ -136,7 +136,7 @@ public virtual async Task SetOrganizationUnitSettingsAsync(OrganizationUnitSetti await SetSettingValueAsync(IdentitySettingNames.OrganizationUnit.MaxUserMembershipCount, settings.MaxUserMembershipCount); } - public async Task GetTwoFactorSettingsAsync(CancellationToken cancellationToken = default) + public virtual async Task GetTwoFactorSettingsAsync(CancellationToken cancellationToken = default) { return new IdentityTwofactorSettings { @@ -149,7 +149,7 @@ public async Task GetTwoFactorSettingsAsync(Cancellat }; } - public async Task SetTwofactorSettingsAsync(IdentityTwofactorSettings settings, CancellationToken cancellationToken = default) + public virtual async Task SetTwofactorSettingsAsync(IdentityTwofactorSettings settings, CancellationToken cancellationToken = default) { await SetSettingValueAsync(IdentitySettingNamesV2.Twofactor.IsRememberBrowserEnabled, settings.IsRememberBrowserEnabled); await SetSettingValueAsync(IdentitySettingNamesV2.Twofactor.TwoFactorBehaviour, settings.TwoFactorBehaviour); diff --git a/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityRoleV2Controller.cs b/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityRoleV2Controller.cs index b7e86f2..d09c79c 100644 --- a/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityRoleV2Controller.cs +++ b/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityRoleV2Controller.cs @@ -45,37 +45,37 @@ public virtual Task MoveAllUserAsync(Guid id, IdentityRoleMoveAllUserRequestDto } [HttpGet("all")] - public Task> GetAllListAsync() + public virtual Task> GetAllListAsync() { return _service.GetAllListAsync(); } [HttpGet("{id}")] - public Task GetAsync(Guid id) + public virtual Task GetAsync(Guid id) { return _service.GetAsync(id); } [HttpGet] - public Task> GetListAsync(GetIdentityRolesInput input) + public virtual Task> GetListAsync(GetIdentityRolesInput input) { return _service.GetListAsync(input); } [HttpPost] - public Task CreateAsync(IdentityRoleCreateDto input) + public virtual Task CreateAsync(IdentityRoleCreateDto input) { return _service.CreateAsync(input); } [HttpPut("{id}")] - public Task UpdateAsync(Guid id, IdentityRoleUpdateDto input) + public virtual Task UpdateAsync(Guid id, IdentityRoleUpdateDto input) { return _service.UpdateAsync(id, input); } [HttpDelete("{id}")] - public Task DeleteAsync(Guid id) + public virtual Task DeleteAsync(Guid id) { return _service.DeleteAsync(id); } diff --git a/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentitySettingsController.cs b/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentitySettingsController.cs index 08d91e4..8d50238 100644 --- a/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentitySettingsController.cs +++ b/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentitySettingsController.cs @@ -24,37 +24,37 @@ public virtual Task GetAsync() } [HttpGet("lockout")] - public Task GetLockoutAsync() + public virtual Task GetLockoutAsync() { return _service.GetLockoutAsync(); } [HttpGet("organization-unit")] - public Task GetOrganizationUnitAsync() + public virtual Task GetOrganizationUnitAsync() { return _service.GetOrganizationUnitAsync(); } [HttpGet("password")] - public Task GetPasswordAsync() + public virtual Task GetPasswordAsync() { return _service.GetPasswordAsync(); } [HttpGet("signin")] - public Task GetSignInAsync() + public virtual Task GetSignInAsync() { return _service.GetSignInAsync(); } [HttpGet("two-factor")] - public Task GetTwofactorAsync() + public virtual Task GetTwofactorAsync() { return _service.GetTwofactorAsync(); } [HttpGet("user")] - public Task GetUserAsync() + public virtual Task GetUserAsync() { return _service.GetUserAsync(); } @@ -66,37 +66,37 @@ public virtual Task UpdateAsync(IdentitySettingsDto input) } [HttpPut("lockout")] - public Task UpdateLockoutAsync(IdentityLockoutSettingsDto input) + public virtual Task UpdateLockoutAsync(IdentityLockoutSettingsDto input) { return _service.UpdateLockoutAsync(input); } [HttpPut("organization-unit")] - public Task UpdateOrganizationUnitAsync(OrganizationUnitSettingsDto input) + public virtual Task UpdateOrganizationUnitAsync(OrganizationUnitSettingsDto input) { return _service.UpdateOrganizationUnitAsync(input); } [HttpPut("password")] - public Task UpdatePasswordAsync(IdentityPasswordSettingsDto input) + public virtual Task UpdatePasswordAsync(IdentityPasswordSettingsDto input) { return _service.UpdatePasswordAsync(input); } [HttpPut("signin")] - public Task UpdateSignInAsync(IdentitySignInSettingsDto input) + public virtual Task UpdateSignInAsync(IdentitySignInSettingsDto input) { return _service.UpdateSignInAsync(input); } [HttpPut("two-factor")] - public Task UpdateTwofactorAsync(IdentityTwofactorSettingsDto input) + public virtual Task UpdateTwofactorAsync(IdentityTwofactorSettingsDto input) { return _service.UpdateTwofactorAsync(input); } [HttpPut("user")] - public Task UpdateUserAsync(IdentityUserSettingsDto input) + public virtual Task UpdateUserAsync(IdentityUserSettingsDto input) { return _service.UpdateUserAsync(input); } diff --git a/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityUserLookupController.cs b/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityUserLookupController.cs index 7064c6a..0d89e99 100644 --- a/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityUserLookupController.cs +++ b/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityUserLookupController.cs @@ -38,14 +38,14 @@ public virtual Task FindByUserNameAsync(string userName) [HttpGet] [Route("search")] - public Task> SearchAsync(UserLookupSearchInputDto input) + public virtual Task> SearchAsync(UserLookupSearchInputDto input) { return LookupAppService.SearchAsync(input); } [HttpGet] [Route("count")] - public Task GetCountAsync(UserLookupCountInputDto input) + public virtual Task GetCountAsync(UserLookupCountInputDto input) { return LookupAppService.GetCountAsync(input); } diff --git a/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityUserV2Controller.cs b/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityUserV2Controller.cs index 0f866d9..435a78b 100644 --- a/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityUserV2Controller.cs +++ b/modules/identity/src/Passingwind.Abp.Identity.HttpApi/IdentityUserV2Controller.cs @@ -225,7 +225,7 @@ public virtual Task BatchUpdatePhoneNumberConfirmedAsync(IdentityUserBatchUpdate } [HttpPut("batch/change-password-on-next-login")] - public Task BatchUpdateChangePasswordOnNextLoginAsync(IdentityUserBatchInputDto input) + public virtual Task BatchUpdateChangePasswordOnNextLoginAsync(IdentityUserBatchInputDto input) { return Service.BatchUpdateChangePasswordOnNextLoginAsync(input); }