refactor: Projektdateien migriert. Cloud-NuGet-Pakete durch lokale NuGet-Projekte ersetzt.

This commit is contained in:
Developer 02
2024-08-01 18:44:39 +02:00
parent 0d82f7af6f
commit 62ddd4873f
206 changed files with 10927 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
using HRD.LDAPService;
using HRD.LDAPService.JWT;
using HRD.WebApi;
using System.Collections.Generic;
namespace StaffDBServer.Extends
{
public static class JwtMiddlewareOptionsHelper
{
public static JwtMiddlewareOptions GetJwtMiddlewareOptions()
{
var list = new List<JwtRole>();
var ADGroupPrefix = WebApiConfig.IsLive ? "" : "__Test";
//Admin Role
list.Add(new JwtRole(JwtGlobals.ROLE_ADMIN, "GG_WebApp" + ADGroupPrefix + "_StaffDB_Admin"));
//Core RoleList
list.Add(new JwtRole(JwtGlobals.ROLE_USER, "GG_WebApp" + ADGroupPrefix + "_StaffDB_User")); //(RO) nur eigene
list.Add(new JwtRole(JwtGlobals.ROLE_MASTER, "GG_WebApp" + ADGroupPrefix + "_StaffDB_Master")); //RW ALLE Abteilungen
list.Add(new JwtRole(JwtGlobals.ROLE_DEPARTMENTUSER, "GG_WebApp" + ADGroupPrefix + "_StaffDB_DepartmentUser")); //(RW) auch andere aus eigener Abteilung
list.Add(new JwtRole(JwtGlobals.ROLE_DEPARTMENTMASTER, "GG_WebApp" + ADGroupPrefix + "_StaffDB_DepartmentMaster")); //(RW) auch andere aus eigener Abteilung
JwtMiddlewareOptions options = new JwtMiddlewareOptions()
{
Secret = "12345678901234567809_MY_VERY_LONG_SECRET",
JwtRoleList = list,
ExpirationInMin = 60 * 24 * 30 * 1, //1 Month
AktivateAuthorizationFilter = true,
AuthorizationFilterWhitelistPath = new List<string>() { "api/WebAppUser/LoginWithNameAndPassword", "api/Info" },
AuthorizationFilterBlacklistPath = new List<string>() { "api/WebAppUser/all" }
};
return options;
}
}
}

View File

@@ -0,0 +1,47 @@
using DAL._Shared.SharedModels;
using DAL._Shared.SharedRepositories;
using DAL.Models.Entities;
using DAL.Repositories;
using HRD.WebApi.Repositories;
using Microsoft.Extensions.DependencyInjection;
namespace StaffDBServer.Extends
{
public static class ServiceExtensions4BaseRepository
{
public static void ConfigureRepositoryWrapper(this IServiceCollection services)
{
services.AddScoped(typeof(IBaseRepository<Subsidiary>), typeof(SubsidiaryRepository));
services.AddScoped(typeof(IBaseRepository<WindreamInputFolder>), typeof(WindreamInputFolderRepository));
services.AddScoped(typeof(IBaseRepository<WindreamSearchToDepartment>), typeof(WindreamSearchToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WindreamSearchItemToWindreamSearchToDepartment>), typeof(WindreamSearchItemToWindreamSearchToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WindreamSearchItem>), typeof(WindreamSearchItemRepository));
services.AddScoped(typeof(IBaseRepository<WindreamSearch>), typeof(WindreamSearchRepository));
services.AddScoped(typeof(IBaseRepository<WindreamIndexToWindreamSearchToDepartment>), typeof(WindreamIndexToWindreamSearchToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WindreamIndex>), typeof(WindreamIndexRepository));
services.AddScoped(typeof(IBaseRepository<WindreamColumnsToDepartment>), typeof(WindreamColumnsToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WebAppToWebAppRole>), typeof(WebAppToWebAppRoleRepository));
services.AddScoped(typeof(IBaseRepository<WebAppToWebAppAdditionalRole>), typeof(WebAppToWebAppAdditionalRoleRepository));
services.AddScoped(typeof(IBaseRepository<WebAppToDepartment>), typeof(WebAppToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<WebAppAdditionalRole>), typeof(WebAppAdditionalRoleRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeToWebApp>), typeof(EmployeeToWebAppRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeToDepartment>), typeof(EmployeeToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeToAttribute>), typeof(EmployeeToAttributeRepository));
services.AddScoped(typeof(IBaseRepository<Employee>), typeof(EmployeeRepository));
services.AddScoped(typeof(IBaseRepository<DocumentArtToDepartment>), typeof(DocumentArtToDepartmentRepository));
services.AddScoped(typeof(IBaseRepository<DepartmentToWebAppToEmployeeForWindream>), typeof(DepartmentToWebAppToEmployeeForWindreamRepository));
services.AddScoped(typeof(IBaseRepository<WebAppRole>), typeof(WebAppRoleRepository));
services.AddScoped(typeof(IBaseRepository<WebApp>), typeof(WebAppRepository));
services.AddScoped(typeof(IBaseRepository<Rang>), typeof(RangRepository));
services.AddScoped(typeof(IBaseRepository<Project>), typeof(ProjectRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeStatus>), typeof(EmployeeStatusRepository));
services.AddScoped(typeof(IBaseRepository<EmployeeAttribute>), typeof(EmployeeAttributeRepository));
services.AddScoped(typeof(IBaseRepository<DocumentArt>), typeof(DocumentArtRepository));
services.AddScoped(typeof(IBaseRepository<Department>), typeof(DepartmentRepository));
services.AddScoped(typeof(IBaseRepository<CostCentre>), typeof(CostCentreRepository));
services.AddScoped(typeof(IBaseRepository<AdWebAppToWebAppRole>), typeof(AdWebAppToWebAppRoleRepository));
services.AddScoped(typeof(IBaseRepository<WebAppUser>), typeof(WebAppUserRepository));
services.AddScoped(typeof(IBaseRepository<WebAppEmployeeInfo>), typeof(WebAppEmployeeInfo));
}
}
}