diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/UserIdentifier.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/UserIdentifier.cs
index 306331e32..c41edecfa 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/UserIdentifier.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications.Core/LINGYUN/Abp/Notifications/UserIdentifier.cs
@@ -16,6 +16,11 @@ namespace LINGYUN.Abp.Notifications
///
public string UserName { get; set; }
+ public UserIdentifier()
+ {
+
+ }
+
public UserIdentifier(Guid userId, string userName)
{
UserId = userId;
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN/Abp/IdentityServer/SmsValidator/SmsTokenGrantValidator.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN/Abp/IdentityServer/SmsValidator/SmsTokenGrantValidator.cs
index cae5f1edd..4c45b135d 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN/Abp/IdentityServer/SmsValidator/SmsTokenGrantValidator.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN/Abp/IdentityServer/SmsValidator/SmsTokenGrantValidator.cs
@@ -114,9 +114,6 @@ namespace LINGYUN.Abp.IdentityServer.SmsValidator
await EventService.RaiseAsync(new UserLoginSuccessEvent(currentUser.UserName, phoneNumber, null));
- // 登录之后需要更新安全令牌
- (await UserManager.UpdateSecurityStampAsync(currentUser)).CheckErrors();
-
await SetSuccessResultAsync(context, currentUser);
}
diff --git a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat.Work/LINGYUN/Abp/IdentityServer/WeChat/Work/WeChatWorkGrantValidator.cs b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat.Work/LINGYUN/Abp/IdentityServer/WeChat/Work/WeChatWorkGrantValidator.cs
index 0e79edea5..36dff4903 100644
--- a/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat.Work/LINGYUN/Abp/IdentityServer/WeChat/Work/WeChatWorkGrantValidator.cs
+++ b/aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.WeChat.Work/LINGYUN/Abp/IdentityServer/WeChat/Work/WeChatWorkGrantValidator.cs
@@ -123,9 +123,6 @@ public class WeChatWorkGrantValidator : IExtensionGrantValidator
await EventService.RaiseAsync(new UserLoginSuccessEvent(AbpWeChatWorkGlobalConsts.ProviderName, userInfo.UserId, null));
- // 登录之后需要更新安全令牌
- (await UserManager.UpdateSecurityStampAsync(currentUser)).CheckErrors();
-
await SetSuccessResultAsync(context, currentUser);
}
catch (AbpWeChatWorkException wwe)
diff --git a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Sms/LINGYUN/Abp/OpenIddict/Sms/SmsTokenExtensionGrant.cs b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Sms/LINGYUN/Abp/OpenIddict/Sms/SmsTokenExtensionGrant.cs
index 2382fbcac..9c5827ded 100644
--- a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Sms/LINGYUN/Abp/OpenIddict/Sms/SmsTokenExtensionGrant.cs
+++ b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.Sms/LINGYUN/Abp/OpenIddict/Sms/SmsTokenExtensionGrant.cs
@@ -116,8 +116,6 @@ public class SmsTokenExtensionGrant : ITokenExtensionGrant
return Forbid(properties, OpenIddictServerAspNetCoreDefaults.AuthenticationScheme);
}
- (await userManager.UpdateSecurityStampAsync(currentUser)).CheckErrors();
-
return await SetSuccessResultAsync(context, currentUser, logger);
}
diff --git a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat.Work/LINGYUN/Abp/OpenIddict/WeChat/Work/WeChatWorkTokenExtensionGrant.cs b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat.Work/LINGYUN/Abp/OpenIddict/WeChat/Work/WeChatWorkTokenExtensionGrant.cs
index d70f54e0e..6a616d45a 100644
--- a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat.Work/LINGYUN/Abp/OpenIddict/WeChat/Work/WeChatWorkTokenExtensionGrant.cs
+++ b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat.Work/LINGYUN/Abp/OpenIddict/WeChat/Work/WeChatWorkTokenExtensionGrant.cs
@@ -119,9 +119,6 @@ public class WeChatWorkTokenExtensionGrant : ITokenExtensionGrant
return Forbid(properties, OpenIddictServerAspNetCoreDefaults.AuthenticationScheme);
}
- // 登录之后需要更新安全令牌
- (await userManager.UpdateSecurityStampAsync(currentUser)).CheckErrors();
-
return await SetSuccessResultAsync(context, currentUser, userInfo.UserId, logger);
}
catch (AbpWeChatWorkException wwe)
diff --git a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/LINGYUN/Abp/OpenIddict/WeChat/WeChatTokenExtensionGrant.cs b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/LINGYUN/Abp/OpenIddict/WeChat/WeChatTokenExtensionGrant.cs
index a4df8be3a..d419676aa 100644
--- a/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/LINGYUN/Abp/OpenIddict/WeChat/WeChatTokenExtensionGrant.cs
+++ b/aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.WeChat/LINGYUN/Abp/OpenIddict/WeChat/WeChatTokenExtensionGrant.cs
@@ -132,9 +132,6 @@ public abstract class WeChatTokenExtensionGrant : ITokenExtensionGrant
return Forbid(properties, OpenIddictServerAspNetCoreDefaults.AuthenticationScheme);
}
- // 登录之后需要更新安全令牌
- (await userManager.UpdateSecurityStampAsync(currentUser)).CheckErrors();
-
return await SetSuccessResultAsync(context, currentUser, wechatOpenId, logger);
}
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN.Abp.WeChat.SettingManagement.csproj b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN.Abp.WeChat.SettingManagement.csproj
index 24d8d0710..05524bd32 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN.Abp.WeChat.SettingManagement.csproj
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN.Abp.WeChat.SettingManagement.csproj
@@ -25,6 +25,7 @@
+
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/AbpWeChatSettingManagementModule.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/AbpWeChatSettingManagementModule.cs
index 42f30a7e5..d3a954d11 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/AbpWeChatSettingManagementModule.cs
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/AbpWeChatSettingManagementModule.cs
@@ -1,6 +1,8 @@
using LINGYUN.Abp.WeChat.Localization;
using LINGYUN.Abp.WeChat.MiniProgram;
using LINGYUN.Abp.WeChat.Official;
+using LINGYUN.Abp.WeChat.Work;
+using LINGYUN.Abp.WeChat.Work.Localization;
using Localization.Resources.AbpUi;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
@@ -13,6 +15,7 @@ namespace LINGYUN.Abp.WeChat.SettingManagement
[DependsOn(
typeof(AbpWeChatOfficialModule),
typeof(AbpWeChatMiniProgramModule),
+ typeof(AbpWeChatWorkModule),
typeof(AbpAspNetCoreMvcModule))]
public class AbpWeChatSettingManagementModule : AbpModule
{
@@ -43,7 +46,8 @@ namespace LINGYUN.Abp.WeChat.SettingManagement
options.Resources
.Get()
.AddBaseTypes(
- typeof(AbpUiResource)
+ typeof(AbpUiResource),
+ typeof(WeChatWorkResource)
);
});
}
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/Localization/Resources/en.json b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/Localization/Resources/en.json
index b7cb9b41e..0aec103da 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/Localization/Resources/en.json
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/Localization/Resources/en.json
@@ -2,6 +2,7 @@
"culture": "en",
"texts": {
"Permission:WeChat.Official": "Official",
- "Permission:WeChat.MiniProgram": "Mini Program"
+ "Permission:WeChat.MiniProgram": "Mini Program",
+ "Permission:WeChat.Work": "Work"
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/Localization/Resources/zh-Hans.json b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/Localization/Resources/zh-Hans.json
index b413b66d6..4c56e130d 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/Localization/Resources/zh-Hans.json
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/Localization/Resources/zh-Hans.json
@@ -2,6 +2,7 @@
"culture": "zh-Hans",
"texts": {
"Permission:WeChat.Official": "公众平台",
- "Permission:WeChat.MiniProgram": "小程序"
+ "Permission:WeChat.MiniProgram": "小程序",
+ "Permission:WeChat.Work": "企业微信"
}
}
\ No newline at end of file
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingAppService.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingAppService.cs
index 4b1fc63ae..67cd2dee6 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingAppService.cs
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingAppService.cs
@@ -3,6 +3,7 @@ using LINGYUN.Abp.WeChat.Localization;
using LINGYUN.Abp.WeChat.MiniProgram.Settings;
using LINGYUN.Abp.WeChat.Official.Settings;
using LINGYUN.Abp.WeChat.Settings;
+using LINGYUN.Abp.WeChat.Work.Settings;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Authorization.Permissions;
@@ -127,6 +128,32 @@ namespace LINGYUN.Abp.WeChat.SettingManagement
settingGroups.AddGroup(wechatSettingGroup);
+ if (await PermissionChecker.IsGrantedAsync(WeChatSettingPermissionNames.Work))
+ {
+ #region 企业微信
+ var wechatWorkSettingGroup = new SettingGroupDto(L["DisplayName:WeChatWork"], L["Description:WeChatWork"]);
+
+ var workLoginSetting = wechatWorkSettingGroup.AddSetting(L["UserLogin"], L["UserLogin"]);
+ workLoginSetting.AddDetail(
+ SettingDefinitionManager.Get(WeChatWorkSettingNames.EnabledQuickLogin),
+ StringLocalizerFactory,
+ await SettingManager.GetOrNullAsync(WeChatWorkSettingNames.EnabledQuickLogin, providerName, providerKey),
+ ValueType.Boolean,
+ providerName);
+
+ var workConnectionSetting = wechatWorkSettingGroup.AddSetting(L["DisplayName:Connection"], L["Description:Connection"]);
+
+ workConnectionSetting.AddDetail(
+ SettingDefinitionManager.Get(WeChatWorkSettingNames.Connection.CorpId),
+ StringLocalizerFactory,
+ await SettingManager.GetOrNullAsync(WeChatWorkSettingNames.Connection.CorpId, providerName, providerKey),
+ ValueType.String,
+ providerName);
+
+ settingGroups.AddGroup(wechatWorkSettingGroup);
+ #endregion
+ }
+
return settingGroups;
}
}
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingPermissionDefinitionProvider.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingPermissionDefinitionProvider.cs
index 420c05660..fb5f3bf42 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingPermissionDefinitionProvider.cs
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingPermissionDefinitionProvider.cs
@@ -1,5 +1,9 @@
using LINGYUN.Abp.WeChat.Localization;
+using LINGYUN.Abp.WeChat.MiniProgram.Features;
+using LINGYUN.Abp.WeChat.Official.Features;
+using LINGYUN.Abp.WeChat.Work.Features;
using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Features;
using Volo.Abp.Localization;
namespace LINGYUN.Abp.WeChat.SettingManagement
@@ -13,10 +17,16 @@ namespace LINGYUN.Abp.WeChat.SettingManagement
L("Permission:WeChat"));
wechatGroup.AddPermission(
- WeChatSettingPermissionNames.Official, L("Permission:WeChat.Official"));
+ WeChatSettingPermissionNames.Official, L("Permission:WeChat.Official"))
+ .RequireFeatures(WeChatOfficialFeatures.Enable);
wechatGroup.AddPermission(
- WeChatSettingPermissionNames.MiniProgram, L("Permission:WeChat.MiniProgram"));
+ WeChatSettingPermissionNames.MiniProgram, L("Permission:WeChat.MiniProgram"))
+ .RequireFeatures(WeChatMiniProgramFeatures.Enable);
+
+ wechatGroup.AddPermission(
+ WeChatSettingPermissionNames.Work, L("Permission:WeChat.Work"))
+ .RequireFeatures(WeChatWorkFeatureNames.Enable);
}
protected LocalizableString L(string name)
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingPermissionNames.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingPermissionNames.cs
index 074493bb8..9a57c954c 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingPermissionNames.cs
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.SettingManagement/LINGYUN/Abp/WeChat/SettingManagement/WeChatSettingPermissionNames.cs
@@ -6,5 +6,6 @@
public const string Official = GroupName + ".Official";
public const string MiniProgram = GroupName + ".MiniProgram";
+ public const string Work = GroupName + ".Work";
}
}
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Localization/Resources/en.json b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Localization/Resources/en.json
index e162c4c43..2bf6fc5dd 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Localization/Resources/en.json
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Localization/Resources/en.json
@@ -18,6 +18,10 @@
"Features:AppChatMessage.LimitDesc": "设置以限制企业微信群聊消息推送上限.",
"Features:AppChatMessage.LimitInterval": "企业微信群聊消息限制周期",
"Features:AppChatMessage.LimitIntervalDesc": "设置企业微信群聊消息限制周期(时间刻度: 分).每企业所有应用发送群消息不可超过2万人次/分,不可超过30万人次/小时.",
+ "DisplayName:WeChatWork": "企业微信",
+ "Description:WeChatWork": "企业微信应用集成",
+ "DisplayName:Connection": "连接参数",
+ "Description:Connection": "企业微信连接参数",
"DisplayName:WeChatWork.Connection.CorpId": "Corp Id",
"Description:WeChatWork.Connection.CorpId": "Each enterprise has a unique corpid, to obtain this information, you can view \"Enterprise ID\" under \"My Enterprise\" - \"Enterprise Information\" in the management background (requires administrator permissions).",
"DisplayName:WeChatWork.EnabledQuickLogin": "Enabled Quick Login",
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Localization/Resources/zh-Hans.json b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Localization/Resources/zh-Hans.json
index 9307b5511..50f6208e8 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Localization/Resources/zh-Hans.json
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Localization/Resources/zh-Hans.json
@@ -18,6 +18,10 @@
"Features:AppChatMessage.LimitDesc": "设置以限制企业微信群聊消息推送上限.",
"Features:AppChatMessage.LimitInterval": "企业微信群聊消息限制周期",
"Features:AppChatMessage.LimitIntervalDesc": "设置企业微信群聊消息限制周期(时间刻度: 分).每企业所有应用发送群消息不可超过2万人次/分,不可超过30万人次/小时.",
+ "DisplayName:WeChatWork": "企业微信",
+ "Description:WeChatWork": "企业微信应用集成",
+ "DisplayName:Connection": "连接参数",
+ "Description:Connection": "企业微信连接参数",
"DisplayName:WeChatWork.Connection.CorpId": "企业Id",
"Description:WeChatWork.Connection.CorpId": "每个企业都拥有唯一的corpid,获取此信息可在管理后台“我的企业”-“企业信息”下查看“企业ID”(需要有管理员权限)",
"DisplayName:WeChatWork.EnabledQuickLogin": "启用快捷登录",
diff --git a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Settings/WeChatWorkSettingDefinitionProvider.cs b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Settings/WeChatWorkSettingDefinitionProvider.cs
index c2269d1af..9597b3a43 100644
--- a/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Settings/WeChatWorkSettingDefinitionProvider.cs
+++ b/aspnet-core/modules/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Settings/WeChatWorkSettingDefinitionProvider.cs
@@ -34,7 +34,7 @@ namespace LINGYUN.Abp.WeChat.Work.Settings
WeChatWorkSettingNames.Connection.CorpId,
displayName: L("DisplayName:WeChatWork.Connection.CorpId"),
description: L("Description:WeChatWork.Connection.CorpId"),
- isEncrypted: false)
+ isEncrypted: true)
.WithProviders(
DefaultValueSettingValueProvider.ProviderName,
ConfigurationSettingValueProvider.ProviderName,
diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJobArgs.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJobArgs.cs
index d15cec9a0..8e1e0d88b 100644
--- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJobArgs.cs
+++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/BackgroundJobs/NotificationPublishJobArgs.cs
@@ -10,6 +10,10 @@ public class NotificationPublishJobArgs
public long NotificationId { get; set; }
public string ProviderType { get; set; }
public List UserIdentifiers { get; set; }
+ public NotificationPublishJobArgs()
+ {
+ UserIdentifiers = new List();
+ }
public NotificationPublishJobArgs(long id, string providerType, List userIdentifiers, Guid? tenantId = null)
{
NotificationId = id;