Browse Source

Merge pull request #362 from colinin/4.4

固定租户管理员用户名为admin;修复自定义的重定向地址不生效的问题
pull/364/head
yx lin 4 years ago
committed by GitHub
parent
commit
98d6bb161f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      aspnet-core/modules/platform/LINGYUN.Abp.UI.Navigation.VueVbenAdmin/LINGYUN/Abp/UI/Navigation/VueVbenAdmin/VueVbenAdminNavigationSeedContributor.cs
  2. 8
      aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantSynchronizer.cs
  3. 4
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj.user

4
aspnet-core/modules/platform/LINGYUN.Abp.UI.Navigation.VueVbenAdmin/LINGYUN/Abp/UI/Navigation/VueVbenAdmin/VueVbenAdminNavigationSeedContributor.cs

@ -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,

8
aspnet-core/services/account/AuthServer.Host/EventBus/Handlers/TenantSynchronizer.cs

@ -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);

4
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj.user

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
Loading…
Cancel
Save