Browse Source
Merge pull request #362 from colinin/4.4
固定租户管理员用户名为admin;修复自定义的重定向地址不生效的问题
pull/364/head
yx lin
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
12 additions and
4 deletions
-
aspnet-core/modules/platform/LINGYUN.Abp.UI.Navigation.VueVbenAdmin/LINGYUN/Abp/UI/Navigation/VueVbenAdmin/VueVbenAdminNavigationSeedContributor.cs
-
aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantSynchronizer.cs
-
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj.user
|
|
|
@ -93,7 +93,7 @@ namespace LINGYUN.Abp.UI.Navigation.VueVbenAdmin |
|
|
|
code: CodeNumberGenerator.CreateCode(GetNextCode()), |
|
|
|
component: layout.Path, |
|
|
|
displayName: menu.DisplayName, |
|
|
|
redirect: "", |
|
|
|
redirect: menu.Redirect, |
|
|
|
description: menu.Description, |
|
|
|
parentId: null, |
|
|
|
tenantId: layout.TenantId, |
|
|
|
@ -136,7 +136,7 @@ namespace LINGYUN.Abp.UI.Navigation.VueVbenAdmin |
|
|
|
code: CodeNumberGenerator.AppendCode(menu.Code, CodeNumberGenerator.CreateCode(index)), |
|
|
|
component: item.Component.IsNullOrWhiteSpace() ? layout.Path : item.Component, |
|
|
|
displayName: item.DisplayName, |
|
|
|
redirect: "", |
|
|
|
redirect: item.Redirect, |
|
|
|
description: item.Description, |
|
|
|
parentId: menu.Id, |
|
|
|
tenantId: menu.TenantId, |
|
|
|
|
|
|
|
@ -98,6 +98,7 @@ namespace AuthServer.Host.EventBus.Handlers |
|
|
|
|
|
|
|
private async Task SeedTenantAdminAsync(CreateEventData eventData) |
|
|
|
{ |
|
|
|
const string tenantAdminUserName = "admin"; |
|
|
|
const string tenantAdminRoleName = "admin"; |
|
|
|
var tenantAdminRoleId = Guid.Empty; ; |
|
|
|
|
|
|
|
@ -120,8 +121,11 @@ namespace AuthServer.Host.EventBus.Handlers |
|
|
|
var tenantAdminUser = await IdentityUserManager.FindByNameAsync(eventData.AdminEmailAddress); |
|
|
|
if (tenantAdminUser == null) |
|
|
|
{ |
|
|
|
tenantAdminUser = new IdentityUser(eventData.AdminUserId, eventData.AdminEmailAddress, |
|
|
|
eventData.AdminEmailAddress, eventData.Id); |
|
|
|
tenantAdminUser = new IdentityUser( |
|
|
|
eventData.AdminUserId, |
|
|
|
tenantAdminUserName, |
|
|
|
eventData.AdminEmailAddress, |
|
|
|
eventData.Id); |
|
|
|
|
|
|
|
tenantAdminUser.AddRole(tenantAdminRoleId); |
|
|
|
|
|
|
|
|
|
|
|
@ -0,0 +1,4 @@ |
|
|
|
<?xml version="1.0" encoding="utf-8"?> |
|
|
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
|
|
<PropertyGroup /> |
|
|
|
</Project> |