diff --git a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/IAuthClient.cs b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/IAuthClient.cs index 8f8ceed..173c0be 100644 --- a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/IAuthClient.cs +++ b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/IAuthClient.cs @@ -10,5 +10,7 @@ public interface IAuthClient ISubjectService SubjectService { get; } ITeamService TeamService { get; } + + IPermissionService PermissionService { get; } } diff --git a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/IEnvironmentProvider.cs b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/IEnvironmentProvider.cs new file mode 100644 index 0000000..63df11e --- /dev/null +++ b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/IEnvironmentProvider.cs @@ -0,0 +1,9 @@ +// Copyright (c) MASA Stack All rights reserved. +// Licensed under the MIT License. See LICENSE.txt in the project root for license information. + +namespace Masa.BuildingBlocks.BasicAbility.Auth; + +public interface IEnvironmentProvider +{ + string GetEnvironment(); +} diff --git a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Masa.BuildingBlocks.BasicAbility.Auth.csproj b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Masa.BuildingBlocks.BasicAbility.Auth.csproj index 132c02c..27ac386 100644 --- a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Masa.BuildingBlocks.BasicAbility.Auth.csproj +++ b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Masa.BuildingBlocks.BasicAbility.Auth.csproj @@ -1,4 +1,4 @@ - + net6.0 diff --git a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Model/MenuModel.cs b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Model/MenuModel.cs new file mode 100644 index 0000000..b2b4c4e --- /dev/null +++ b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Model/MenuModel.cs @@ -0,0 +1,19 @@ +// Copyright (c) MASA Stack All rights reserved. +// Licensed under the MIT License. See LICENSE.txt in the project root for license information. + +namespace Masa.BuildingBlocks.BasicAbility.Auth.Model; + +public class MenuModel +{ + public Guid Id { get; set; } + + public string Name { get; set; } + + public string Code { get; set; } + + public string Icon { get; set; } + + public string Url { get; set; } + + public List Children { get; set; } = new(); +} diff --git a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Model/TeamModel.cs b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Model/TeamModel.cs new file mode 100644 index 0000000..b9db79b --- /dev/null +++ b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Model/TeamModel.cs @@ -0,0 +1,13 @@ +// Copyright (c) MASA Stack All rights reserved. +// Licensed under the MIT License. See LICENSE.txt in the project root for license information. + +namespace Masa.BuildingBlocks.BasicAbility.Auth.Model; + +public class TeamModel +{ + public Guid Id { get; set; } + + public string Name { get; set; } + + public string Avatar { get; set; } +} diff --git a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/IPermissionService.cs b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/IPermissionService.cs new file mode 100644 index 0000000..43e1509 --- /dev/null +++ b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/IPermissionService.cs @@ -0,0 +1,13 @@ +// Copyright (c) MASA Stack All rights reserved. +// Licensed under the MIT License. See LICENSE.txt in the project root for license information. + +namespace Masa.BuildingBlocks.BasicAbility.Auth.Service; + +public interface IPermissionService +{ + Task> GetMenusAsync(string appId, Guid userId); + + Task> GetElementPermissionsAsync(string appId, Guid userId); + + Task AuthorizedAsync(string appId, string code, Guid userId); +} diff --git a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/ITeamService.cs b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/ITeamService.cs index 61459d8..47b9a13 100644 --- a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/ITeamService.cs +++ b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/ITeamService.cs @@ -6,5 +6,7 @@ namespace Masa.BuildingBlocks.BasicAbility.Auth.Service; public interface ITeamService { Task GetDetailAsync(Guid id); + + Task> GetListAsync(Guid userId = default); } diff --git a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/IUserService.cs b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/IUserService.cs index 3f50fa4..79b337e 100644 --- a/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/IUserService.cs +++ b/src/BasicAbility/Masa.BuildingBlocks.BasicAbility.Auth/Service/IUserService.cs @@ -12,5 +12,9 @@ public interface IUserService Task> GetListByDepartmentAsync(Guid departmentId); Task AddAsync(AddUserModel user); + + Task ValidateCredentialsByAccountAsync(string account, string password); + + Task FindByAccountAsync(string account); } diff --git a/src/SearchEngine/Masa.BuildingBlocks.SearchEngine.AutoComplete/Masa.BuildingBlocks.SearchEngine.AutoComplete.csproj b/src/SearchEngine/Masa.BuildingBlocks.SearchEngine.AutoComplete/Masa.BuildingBlocks.SearchEngine.AutoComplete.csproj index eb2460e..ca62071 100644 --- a/src/SearchEngine/Masa.BuildingBlocks.SearchEngine.AutoComplete/Masa.BuildingBlocks.SearchEngine.AutoComplete.csproj +++ b/src/SearchEngine/Masa.BuildingBlocks.SearchEngine.AutoComplete/Masa.BuildingBlocks.SearchEngine.AutoComplete.csproj @@ -1,4 +1,4 @@ - + net6.0