From c27890a31fa8ffb2f0f0c921f3dd18d925cdc7c2 Mon Sep 17 00:00:00 2001 From: max Date: Mon, 27 Jan 2025 01:21:09 +0100 Subject: [PATCH] [CHANGE] Building data structure --- Blazor.Wasm/App.razor | 0 Blazor.Wasm/Blazor.Wasm.csproj | 0 Blazor.Wasm/Layout/MainLayout.razor | 0 Blazor.Wasm/Layout/MainLayout.razor.css | 0 Blazor.Wasm/Layout/NavMenu.razor | 0 Blazor.Wasm/Layout/NavMenu.razor.css | 0 Blazor.Wasm/Pages/Counter.razor | 0 Blazor.Wasm/Pages/Home.razor | 0 Blazor.Wasm/Pages/Weather.razor | 0 Blazor.Wasm/Program.cs | 0 Blazor.Wasm/Properties/launchSettings.json | 0 Blazor.Wasm/_Imports.razor | 0 Blazor.Wasm/wwwroot/css/app.css | 0 .../wwwroot/css/bootstrap/bootstrap.min.css | 0 .../css/bootstrap/bootstrap.min.css.map | 0 Blazor.Wasm/wwwroot/favicon.png | Bin Blazor.Wasm/wwwroot/icon-192.png | Bin Blazor.Wasm/wwwroot/index.html | 0 Blazor.Wasm/wwwroot/sample-data/weather.json | 0 DotBased.ASP.Auth/AuthDataCache.cs | 0 DotBased.ASP.Auth/AuthenticationService.cs | 0 DotBased.ASP.Auth/BasedAuthConfiguration.cs | 0 DotBased.ASP.Auth/BasedAuthDefaults.cs | 0 .../BasedServerAuthenticationStateProvider.cs | 0 .../Domains/Auth/AuthenticationStateModel.cs | 0 .../Domains/Auth/PermissionModel.cs | 0 DotBased.ASP.Auth/Domains/Auth/RoleModel.cs | 0 .../Domains/Identity/GroupItemModel.cs | 0 .../Domains/Identity/GroupModel.cs | 0 .../Domains/Identity/UserItemModel.cs | 0 .../Domains/Identity/UserModel.cs | 0 DotBased.ASP.Auth/Domains/LoginModel.cs | 0 DotBased.ASP.Auth/Domains/RegisterModel.cs | 0 DotBased.ASP.Auth/DotBased.ASP.Auth.csproj | 0 .../DotBasedAuthDependencyInjection.cs | 0 DotBased.ASP.Auth/IAuthDataRepository.cs | 0 DotBased.ASP.Auth/ISessionStateProvider.cs | 0 DotBased.ASP.Auth/MemoryAuthDataRepository.cs | 0 .../Models/Configuration/AuthConfiguration.cs | 0 .../Configuration/CacheConfiguration.cs | 0 .../Configuration/LockoutConfiguration.cs | 0 .../Configuration/PasswordConfiguration.cs | 0 .../Configuration/ProviderConfiguration.cs | 0 .../Configuration/RepositoryConfiguration.cs | 0 .../Models/Configuration/UserConfiguration.cs | 0 DotBased.ASP.Auth/SecurityManager.cs | 0 DotBased.ASP.Auth/SecurityService.cs | 0 .../Attributes/ProtectAttribute.cs | 0 DotBased.AspNet.Authority/AuthorityBuilder.cs | 0 .../AuthorityDefaults.cs | 0 .../AuthorityProviderExtensions.cs | 0 .../Crypto/Cryptographer.cs | 0 .../Crypto/ICryptographer.cs | 0 .../Crypto/IPasswordHasher.cs | 0 .../Crypto/PasswordHasher.cs | 0 .../DotBased.AspNet.Authority.csproj | 0 .../Managers/AuthorityGroupManager.cs | 6 +- .../Managers/AuthorityManager.cs | 43 ++-- .../Managers/AuthorityRoleManager.cs | 33 +++- .../Managers/AuthorityUserManager.cs | 0 .../Models/Authority/AuthorityAttribute.cs | 0 .../Models/Authority/AuthorityGroup.cs | 0 .../Models/Authority/AuthorityRole.cs | 16 +- .../Models/Authority/AuthorityUser.cs | 16 +- .../Models/AuthorityResult.cs | 0 .../Models/Options/AuthorityOptions.cs | 0 .../Models/Options/ListOption.cs | 0 .../Models/Options/LockdownOptions.cs | 0 .../Models/Options/LockoutOptions.cs | 0 .../Models/Options/PasswordOptions.cs | 0 .../Models/Options/ProviderOptions.cs | 0 .../Models/Options/RepositoryOptions.cs | 0 .../Models/Options/SignInOptions.cs | 0 .../Models/Options/UserOptions.cs | 0 .../Models/Validation/ValidationError.cs | 0 .../Models/Validation/ValidationResult.cs | 0 .../Repositories/IAttributeRepository.cs | 0 .../Repositories/IGroupRepository.cs | 0 .../Repositories/IRoleRepository.cs | 0 .../Repositories/IUserRepository.cs | 0 .../Validators/IPasswordValidator.cs | 0 .../Validators/IUserValidator.cs | 0 .../Validators/PasswordEqualsValidator.cs | 0 .../Validators/PasswordOptionsValidator.cs | 0 .../Validators/UserValidator.cs | 0 .../Verifiers/IEmailVerifier.cs | 0 .../Verifiers/IPhoneNumberVerifier.cs | 0 .../Verifiers/IUserVerifier.cs | 0 DotBased.Data/DotBased.Data.csproj | 12 ++ DotBased.Logging.MEL/BasedLogger.cs | 0 DotBased.Logging.MEL/BasedLoggerProvider.cs | 0 .../DotBased.Logging.MEL.csproj | 0 .../LoggerBuilderExtensions.cs | 0 DotBased.Logging.Serilog/BasedSerilog.cs | 0 .../BasedSerilogEnricher.cs | 0 DotBased.sln | 7 + DotBased/Objects/DbObjectAttribute.cs | 0 DotBased/Objects/IObjectAttribute.cs | 0 DotBased/Objects/ObjectAttribute.cs | 0 TestWebApi/Program.cs | 0 TestWebApi/Properties/launchSettings.json | 0 TestWebApi/SeedAuthorityData.cs | 0 TestWebApi/TestWebApi.csproj | 0 TestWebApi/TestWebApi.http | 0 TestWebApi/appsettings.Development.json | 0 TestWebApi/appsettings.json | 0 obs_DotBased/.obsidian/app.json | 1 + obs_DotBased/.obsidian/appearance.json | 1 + obs_DotBased/.obsidian/core-plugins.json | 30 +++ obs_DotBased/.obsidian/graph.json | 22 +++ obs_DotBased/.obsidian/workspace.json | 186 ++++++++++++++++++ .../DotBased.Authority/Data diagram.canvas | 22 +++ .../Models/AuthorityAttribute.md | 2 + .../Models/AuthorityGroup.md | 2 + .../Models/AuthorityRole.md | 1 + .../Models/AuthorityUser.md | 1 + .../Repositories/UserRepository.md | 6 + .../AspNet/DotBased.Authority/Repository.md | 0 118 files changed, 356 insertions(+), 51 deletions(-) mode change 100644 => 100755 Blazor.Wasm/App.razor mode change 100644 => 100755 Blazor.Wasm/Blazor.Wasm.csproj mode change 100644 => 100755 Blazor.Wasm/Layout/MainLayout.razor mode change 100644 => 100755 Blazor.Wasm/Layout/MainLayout.razor.css mode change 100644 => 100755 Blazor.Wasm/Layout/NavMenu.razor mode change 100644 => 100755 Blazor.Wasm/Layout/NavMenu.razor.css mode change 100644 => 100755 Blazor.Wasm/Pages/Counter.razor mode change 100644 => 100755 Blazor.Wasm/Pages/Home.razor mode change 100644 => 100755 Blazor.Wasm/Pages/Weather.razor mode change 100644 => 100755 Blazor.Wasm/Program.cs mode change 100644 => 100755 Blazor.Wasm/Properties/launchSettings.json mode change 100644 => 100755 Blazor.Wasm/_Imports.razor mode change 100644 => 100755 Blazor.Wasm/wwwroot/css/app.css mode change 100644 => 100755 Blazor.Wasm/wwwroot/css/bootstrap/bootstrap.min.css mode change 100644 => 100755 Blazor.Wasm/wwwroot/css/bootstrap/bootstrap.min.css.map mode change 100644 => 100755 Blazor.Wasm/wwwroot/favicon.png mode change 100644 => 100755 Blazor.Wasm/wwwroot/icon-192.png mode change 100644 => 100755 Blazor.Wasm/wwwroot/index.html mode change 100644 => 100755 Blazor.Wasm/wwwroot/sample-data/weather.json mode change 100644 => 100755 DotBased.ASP.Auth/AuthDataCache.cs mode change 100644 => 100755 DotBased.ASP.Auth/AuthenticationService.cs mode change 100644 => 100755 DotBased.ASP.Auth/BasedAuthConfiguration.cs mode change 100644 => 100755 DotBased.ASP.Auth/BasedAuthDefaults.cs mode change 100644 => 100755 DotBased.ASP.Auth/BasedServerAuthenticationStateProvider.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/Auth/AuthenticationStateModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/Auth/PermissionModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/Auth/RoleModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/Identity/GroupItemModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/Identity/GroupModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/Identity/UserItemModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/Identity/UserModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/LoginModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/Domains/RegisterModel.cs mode change 100644 => 100755 DotBased.ASP.Auth/DotBased.ASP.Auth.csproj mode change 100644 => 100755 DotBased.ASP.Auth/DotBasedAuthDependencyInjection.cs mode change 100644 => 100755 DotBased.ASP.Auth/IAuthDataRepository.cs mode change 100644 => 100755 DotBased.ASP.Auth/ISessionStateProvider.cs mode change 100644 => 100755 DotBased.ASP.Auth/MemoryAuthDataRepository.cs mode change 100644 => 100755 DotBased.ASP.Auth/Models/Configuration/AuthConfiguration.cs mode change 100644 => 100755 DotBased.ASP.Auth/Models/Configuration/CacheConfiguration.cs mode change 100644 => 100755 DotBased.ASP.Auth/Models/Configuration/LockoutConfiguration.cs mode change 100644 => 100755 DotBased.ASP.Auth/Models/Configuration/PasswordConfiguration.cs mode change 100644 => 100755 DotBased.ASP.Auth/Models/Configuration/ProviderConfiguration.cs mode change 100644 => 100755 DotBased.ASP.Auth/Models/Configuration/RepositoryConfiguration.cs mode change 100644 => 100755 DotBased.ASP.Auth/Models/Configuration/UserConfiguration.cs mode change 100644 => 100755 DotBased.ASP.Auth/SecurityManager.cs mode change 100644 => 100755 DotBased.ASP.Auth/SecurityService.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Attributes/ProtectAttribute.cs mode change 100644 => 100755 DotBased.AspNet.Authority/AuthorityBuilder.cs mode change 100644 => 100755 DotBased.AspNet.Authority/AuthorityDefaults.cs mode change 100644 => 100755 DotBased.AspNet.Authority/AuthorityProviderExtensions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Crypto/Cryptographer.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Crypto/ICryptographer.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Crypto/IPasswordHasher.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Crypto/PasswordHasher.cs mode change 100644 => 100755 DotBased.AspNet.Authority/DotBased.AspNet.Authority.csproj mode change 100644 => 100755 DotBased.AspNet.Authority/Managers/AuthorityGroupManager.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Managers/AuthorityManager.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Managers/AuthorityRoleManager.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Managers/AuthorityUserManager.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Authority/AuthorityAttribute.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Authority/AuthorityGroup.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Authority/AuthorityRole.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Authority/AuthorityUser.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/AuthorityResult.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/AuthorityOptions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/ListOption.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/LockdownOptions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/LockoutOptions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/PasswordOptions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/ProviderOptions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/RepositoryOptions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/SignInOptions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Options/UserOptions.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Validation/ValidationError.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Models/Validation/ValidationResult.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Repositories/IAttributeRepository.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Repositories/IGroupRepository.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Repositories/IRoleRepository.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Repositories/IUserRepository.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Validators/IPasswordValidator.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Validators/IUserValidator.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Validators/PasswordEqualsValidator.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Validators/PasswordOptionsValidator.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Validators/UserValidator.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Verifiers/IEmailVerifier.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Verifiers/IPhoneNumberVerifier.cs mode change 100644 => 100755 DotBased.AspNet.Authority/Verifiers/IUserVerifier.cs create mode 100644 DotBased.Data/DotBased.Data.csproj mode change 100644 => 100755 DotBased.Logging.MEL/BasedLogger.cs mode change 100644 => 100755 DotBased.Logging.MEL/BasedLoggerProvider.cs mode change 100644 => 100755 DotBased.Logging.MEL/DotBased.Logging.MEL.csproj mode change 100644 => 100755 DotBased.Logging.MEL/LoggerBuilderExtensions.cs mode change 100644 => 100755 DotBased.Logging.Serilog/BasedSerilog.cs mode change 100644 => 100755 DotBased.Logging.Serilog/BasedSerilogEnricher.cs mode change 100644 => 100755 DotBased/Objects/DbObjectAttribute.cs mode change 100644 => 100755 DotBased/Objects/IObjectAttribute.cs mode change 100644 => 100755 DotBased/Objects/ObjectAttribute.cs mode change 100644 => 100755 TestWebApi/Program.cs mode change 100644 => 100755 TestWebApi/Properties/launchSettings.json mode change 100644 => 100755 TestWebApi/SeedAuthorityData.cs mode change 100644 => 100755 TestWebApi/TestWebApi.csproj mode change 100644 => 100755 TestWebApi/TestWebApi.http mode change 100644 => 100755 TestWebApi/appsettings.Development.json mode change 100644 => 100755 TestWebApi/appsettings.json create mode 100644 obs_DotBased/.obsidian/app.json create mode 100644 obs_DotBased/.obsidian/appearance.json create mode 100644 obs_DotBased/.obsidian/core-plugins.json create mode 100644 obs_DotBased/.obsidian/graph.json create mode 100644 obs_DotBased/.obsidian/workspace.json create mode 100644 obs_DotBased/Modules/AspNet/DotBased.Authority/Data diagram.canvas create mode 100644 obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityAttribute.md create mode 100644 obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityGroup.md create mode 100644 obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityRole.md create mode 100644 obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityUser.md create mode 100644 obs_DotBased/Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md create mode 100644 obs_DotBased/Modules/AspNet/DotBased.Authority/Repository.md diff --git a/Blazor.Wasm/App.razor b/Blazor.Wasm/App.razor old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Blazor.Wasm.csproj b/Blazor.Wasm/Blazor.Wasm.csproj old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Layout/MainLayout.razor b/Blazor.Wasm/Layout/MainLayout.razor old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Layout/MainLayout.razor.css b/Blazor.Wasm/Layout/MainLayout.razor.css old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Layout/NavMenu.razor b/Blazor.Wasm/Layout/NavMenu.razor old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Layout/NavMenu.razor.css b/Blazor.Wasm/Layout/NavMenu.razor.css old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Pages/Counter.razor b/Blazor.Wasm/Pages/Counter.razor old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Pages/Home.razor b/Blazor.Wasm/Pages/Home.razor old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Pages/Weather.razor b/Blazor.Wasm/Pages/Weather.razor old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Program.cs b/Blazor.Wasm/Program.cs old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/Properties/launchSettings.json b/Blazor.Wasm/Properties/launchSettings.json old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/_Imports.razor b/Blazor.Wasm/_Imports.razor old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/wwwroot/css/app.css b/Blazor.Wasm/wwwroot/css/app.css old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/wwwroot/css/bootstrap/bootstrap.min.css b/Blazor.Wasm/wwwroot/css/bootstrap/bootstrap.min.css old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/wwwroot/css/bootstrap/bootstrap.min.css.map b/Blazor.Wasm/wwwroot/css/bootstrap/bootstrap.min.css.map old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/wwwroot/favicon.png b/Blazor.Wasm/wwwroot/favicon.png old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/wwwroot/icon-192.png b/Blazor.Wasm/wwwroot/icon-192.png old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/wwwroot/index.html b/Blazor.Wasm/wwwroot/index.html old mode 100644 new mode 100755 diff --git a/Blazor.Wasm/wwwroot/sample-data/weather.json b/Blazor.Wasm/wwwroot/sample-data/weather.json old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/AuthDataCache.cs b/DotBased.ASP.Auth/AuthDataCache.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/AuthenticationService.cs b/DotBased.ASP.Auth/AuthenticationService.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/BasedAuthConfiguration.cs b/DotBased.ASP.Auth/BasedAuthConfiguration.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/BasedAuthDefaults.cs b/DotBased.ASP.Auth/BasedAuthDefaults.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/BasedServerAuthenticationStateProvider.cs b/DotBased.ASP.Auth/BasedServerAuthenticationStateProvider.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/Auth/AuthenticationStateModel.cs b/DotBased.ASP.Auth/Domains/Auth/AuthenticationStateModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/Auth/PermissionModel.cs b/DotBased.ASP.Auth/Domains/Auth/PermissionModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/Auth/RoleModel.cs b/DotBased.ASP.Auth/Domains/Auth/RoleModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/Identity/GroupItemModel.cs b/DotBased.ASP.Auth/Domains/Identity/GroupItemModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/Identity/GroupModel.cs b/DotBased.ASP.Auth/Domains/Identity/GroupModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/Identity/UserItemModel.cs b/DotBased.ASP.Auth/Domains/Identity/UserItemModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/Identity/UserModel.cs b/DotBased.ASP.Auth/Domains/Identity/UserModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/LoginModel.cs b/DotBased.ASP.Auth/Domains/LoginModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Domains/RegisterModel.cs b/DotBased.ASP.Auth/Domains/RegisterModel.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/DotBased.ASP.Auth.csproj b/DotBased.ASP.Auth/DotBased.ASP.Auth.csproj old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/DotBasedAuthDependencyInjection.cs b/DotBased.ASP.Auth/DotBasedAuthDependencyInjection.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/IAuthDataRepository.cs b/DotBased.ASP.Auth/IAuthDataRepository.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/ISessionStateProvider.cs b/DotBased.ASP.Auth/ISessionStateProvider.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/MemoryAuthDataRepository.cs b/DotBased.ASP.Auth/MemoryAuthDataRepository.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Models/Configuration/AuthConfiguration.cs b/DotBased.ASP.Auth/Models/Configuration/AuthConfiguration.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Models/Configuration/CacheConfiguration.cs b/DotBased.ASP.Auth/Models/Configuration/CacheConfiguration.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Models/Configuration/LockoutConfiguration.cs b/DotBased.ASP.Auth/Models/Configuration/LockoutConfiguration.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Models/Configuration/PasswordConfiguration.cs b/DotBased.ASP.Auth/Models/Configuration/PasswordConfiguration.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Models/Configuration/ProviderConfiguration.cs b/DotBased.ASP.Auth/Models/Configuration/ProviderConfiguration.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Models/Configuration/RepositoryConfiguration.cs b/DotBased.ASP.Auth/Models/Configuration/RepositoryConfiguration.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/Models/Configuration/UserConfiguration.cs b/DotBased.ASP.Auth/Models/Configuration/UserConfiguration.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/SecurityManager.cs b/DotBased.ASP.Auth/SecurityManager.cs old mode 100644 new mode 100755 diff --git a/DotBased.ASP.Auth/SecurityService.cs b/DotBased.ASP.Auth/SecurityService.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Attributes/ProtectAttribute.cs b/DotBased.AspNet.Authority/Attributes/ProtectAttribute.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/AuthorityBuilder.cs b/DotBased.AspNet.Authority/AuthorityBuilder.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/AuthorityDefaults.cs b/DotBased.AspNet.Authority/AuthorityDefaults.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/AuthorityProviderExtensions.cs b/DotBased.AspNet.Authority/AuthorityProviderExtensions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Crypto/Cryptographer.cs b/DotBased.AspNet.Authority/Crypto/Cryptographer.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Crypto/ICryptographer.cs b/DotBased.AspNet.Authority/Crypto/ICryptographer.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Crypto/IPasswordHasher.cs b/DotBased.AspNet.Authority/Crypto/IPasswordHasher.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Crypto/PasswordHasher.cs b/DotBased.AspNet.Authority/Crypto/PasswordHasher.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/DotBased.AspNet.Authority.csproj b/DotBased.AspNet.Authority/DotBased.AspNet.Authority.csproj old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Managers/AuthorityGroupManager.cs b/DotBased.AspNet.Authority/Managers/AuthorityGroupManager.cs old mode 100644 new mode 100755 index 22e70cb..a91e65d --- a/DotBased.AspNet.Authority/Managers/AuthorityGroupManager.cs +++ b/DotBased.AspNet.Authority/Managers/AuthorityGroupManager.cs @@ -2,5 +2,9 @@ namespace DotBased.AspNet.Authority.Managers; public partial class AuthorityManager { - + /* + * - Validate User & Group + * - Check if user is already in group (if already in group return) + * - Add to UsersGroups table + */ } \ No newline at end of file diff --git a/DotBased.AspNet.Authority/Managers/AuthorityManager.cs b/DotBased.AspNet.Authority/Managers/AuthorityManager.cs old mode 100644 new mode 100755 index 50548b1..a9f83f9 --- a/DotBased.AspNet.Authority/Managers/AuthorityManager.cs +++ b/DotBased.AspNet.Authority/Managers/AuthorityManager.cs @@ -9,36 +9,25 @@ using Microsoft.Extensions.Options; namespace DotBased.AspNet.Authority.Managers; -public partial class AuthorityManager +public partial class AuthorityManager( + IOptions options, + IServiceProvider services, + ICryptographer cryptographer, + IUserRepository userRepository, + IRoleRepository roleRepository, + IPasswordHasher passwordHasher) { - public AuthorityManager( - IOptions options, - IServiceProvider services, - ICryptographer cryptographer, - IUserRepository userRepository, - IRoleRepository roleRepository, - IPasswordHasher passwordHasher) - { - _logger = LogService.RegisterLogger(); - Options = options.Value; - Services = services; - Cryptographer = cryptographer; - UserRepository = userRepository; - RoleRepository = roleRepository; - PasswordHasher = passwordHasher; - } + private readonly ILogger _logger = LogService.RegisterLogger(); - private readonly ILogger _logger; + public IServiceProvider Services { get; } = services; + public AuthorityOptions Options { get; } = options.Value; + public ICryptographer Cryptographer { get; } = cryptographer; + + public IUserRepository UserRepository { get; } = userRepository; + public IRoleRepository RoleRepository { get; } = roleRepository; + + public IPasswordHasher PasswordHasher { get; } = passwordHasher; - public IServiceProvider Services { get; } - public AuthorityOptions Options { get; } - public ICryptographer Cryptographer { get; } - - public IUserRepository UserRepository { get; } - public IRoleRepository RoleRepository { get; } - - public IPasswordHasher PasswordHasher { get; } - public IEnumerable PasswordValidators { get; } = []; public IEnumerable UserValidators { get; } = []; diff --git a/DotBased.AspNet.Authority/Managers/AuthorityRoleManager.cs b/DotBased.AspNet.Authority/Managers/AuthorityRoleManager.cs old mode 100644 new mode 100755 index 52f09a5..2b62e98 --- a/DotBased.AspNet.Authority/Managers/AuthorityRoleManager.cs +++ b/DotBased.AspNet.Authority/Managers/AuthorityRoleManager.cs @@ -19,9 +19,22 @@ public partial class AuthorityManager return Result.Failed("Not implemented!"); } + public async Task> GetRolesAsync(int limit = 20, int offset = 0, string search = "", CancellationToken? cancellationToken = null) + { + /* + * Search by role name & id + * Order by name, created date, creator? (paging) + */ + return ListResult.Failed("Not implemented!"); + } + public async Task AddRoleToUserAsync(AuthorityUser user, AuthorityRole role, CancellationToken? cancellationToken = null) { - + /* + - Validate User & Role + - Check if role is already in linked to user (if user already has the role, return) + - Add to UsersRoles table + */ } public async Task RemoveRoleFromUserAsync(AuthorityRole role, AuthorityUser user, CancellationToken? cancellationToken = null) @@ -31,4 +44,22 @@ public partial class AuthorityManager public async Task AddRoleToGroupAsync(AuthorityRole role, AuthorityGroup group, CancellationToken? cancellationToken = null) { } + + /// + /// Get all roles (including group roles) that the user has. + /// + /// The user to get the roles from + /// + public async Task> GetUserRolesAsync(AuthorityUser user, CancellationToken? cancellationToken = null) + { + /* + * - Validate user + * - Get user groups (id) + * - Get roles contained from user + * - Get roles contained from groups (if any) + * - Order by (for paging) + */ + + return ListResult.Failed("Not implemented!"); + } } \ No newline at end of file diff --git a/DotBased.AspNet.Authority/Managers/AuthorityUserManager.cs b/DotBased.AspNet.Authority/Managers/AuthorityUserManager.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Authority/AuthorityAttribute.cs b/DotBased.AspNet.Authority/Models/Authority/AuthorityAttribute.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Authority/AuthorityGroup.cs b/DotBased.AspNet.Authority/Models/Authority/AuthorityGroup.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Authority/AuthorityRole.cs b/DotBased.AspNet.Authority/Models/Authority/AuthorityRole.cs old mode 100644 new mode 100755 index 1e22cb5..f1ef51a --- a/DotBased.AspNet.Authority/Models/Authority/AuthorityRole.cs +++ b/DotBased.AspNet.Authority/Models/Authority/AuthorityRole.cs @@ -1,25 +1,19 @@ namespace DotBased.AspNet.Authority.Models.Authority; -public abstract class AuthorityRole +public abstract class AuthorityRole() { public AuthorityRole(string name) : this() { Name = name; } - - public AuthorityRole() - { - Id = Guid.NewGuid(); - CreatedDate = DateTime.Now; - } - - public Guid Id { get; set; } - + + public Guid Id { get; set; } = Guid.NewGuid(); + public string? Name { get; set; } public long Version { get; set; } - public DateTime CreatedDate { get; set; } + public DateTime CreatedDate { get; set; } = DateTime.Now; public override string ToString() => Name ?? string.Empty; } \ No newline at end of file diff --git a/DotBased.AspNet.Authority/Models/Authority/AuthorityUser.cs b/DotBased.AspNet.Authority/Models/Authority/AuthorityUser.cs old mode 100644 new mode 100755 index 9f52b58..bc90356 --- a/DotBased.AspNet.Authority/Models/Authority/AuthorityUser.cs +++ b/DotBased.AspNet.Authority/Models/Authority/AuthorityUser.cs @@ -2,21 +2,15 @@ using DotBased.AspNet.Authority.Attributes; namespace DotBased.AspNet.Authority.Models.Authority; -public class AuthorityUser +public class AuthorityUser() { public AuthorityUser(string userName) : this() { UserName = userName; } - - public AuthorityUser() - { - Id = Guid.NewGuid(); - CreatedDate = DateTime.Now; - } - - public Guid Id { get; set; } - + + public Guid Id { get; set; } = Guid.NewGuid(); + public bool Enabled { get; set; } public bool Confirmed { get; set; } @@ -29,7 +23,7 @@ public class AuthorityUser public string? PasswordHash { get; set; } - public DateTime CreatedDate { get; set; } + public DateTime CreatedDate { get; set; } = DateTime.Now; public bool TwoFactorEnabled { get; set; } diff --git a/DotBased.AspNet.Authority/Models/AuthorityResult.cs b/DotBased.AspNet.Authority/Models/AuthorityResult.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/AuthorityOptions.cs b/DotBased.AspNet.Authority/Models/Options/AuthorityOptions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/ListOption.cs b/DotBased.AspNet.Authority/Models/Options/ListOption.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/LockdownOptions.cs b/DotBased.AspNet.Authority/Models/Options/LockdownOptions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/LockoutOptions.cs b/DotBased.AspNet.Authority/Models/Options/LockoutOptions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/PasswordOptions.cs b/DotBased.AspNet.Authority/Models/Options/PasswordOptions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/ProviderOptions.cs b/DotBased.AspNet.Authority/Models/Options/ProviderOptions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/RepositoryOptions.cs b/DotBased.AspNet.Authority/Models/Options/RepositoryOptions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/SignInOptions.cs b/DotBased.AspNet.Authority/Models/Options/SignInOptions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Options/UserOptions.cs b/DotBased.AspNet.Authority/Models/Options/UserOptions.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Validation/ValidationError.cs b/DotBased.AspNet.Authority/Models/Validation/ValidationError.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Models/Validation/ValidationResult.cs b/DotBased.AspNet.Authority/Models/Validation/ValidationResult.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Repositories/IAttributeRepository.cs b/DotBased.AspNet.Authority/Repositories/IAttributeRepository.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Repositories/IGroupRepository.cs b/DotBased.AspNet.Authority/Repositories/IGroupRepository.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Repositories/IRoleRepository.cs b/DotBased.AspNet.Authority/Repositories/IRoleRepository.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Repositories/IUserRepository.cs b/DotBased.AspNet.Authority/Repositories/IUserRepository.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Validators/IPasswordValidator.cs b/DotBased.AspNet.Authority/Validators/IPasswordValidator.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Validators/IUserValidator.cs b/DotBased.AspNet.Authority/Validators/IUserValidator.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Validators/PasswordEqualsValidator.cs b/DotBased.AspNet.Authority/Validators/PasswordEqualsValidator.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Validators/PasswordOptionsValidator.cs b/DotBased.AspNet.Authority/Validators/PasswordOptionsValidator.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Validators/UserValidator.cs b/DotBased.AspNet.Authority/Validators/UserValidator.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Verifiers/IEmailVerifier.cs b/DotBased.AspNet.Authority/Verifiers/IEmailVerifier.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Verifiers/IPhoneNumberVerifier.cs b/DotBased.AspNet.Authority/Verifiers/IPhoneNumberVerifier.cs old mode 100644 new mode 100755 diff --git a/DotBased.AspNet.Authority/Verifiers/IUserVerifier.cs b/DotBased.AspNet.Authority/Verifiers/IUserVerifier.cs old mode 100644 new mode 100755 diff --git a/DotBased.Data/DotBased.Data.csproj b/DotBased.Data/DotBased.Data.csproj new file mode 100644 index 0000000..f5d3ce2 --- /dev/null +++ b/DotBased.Data/DotBased.Data.csproj @@ -0,0 +1,12 @@ + + + + netstandard2.1 + enable + + + + + + + diff --git a/DotBased.Logging.MEL/BasedLogger.cs b/DotBased.Logging.MEL/BasedLogger.cs old mode 100644 new mode 100755 diff --git a/DotBased.Logging.MEL/BasedLoggerProvider.cs b/DotBased.Logging.MEL/BasedLoggerProvider.cs old mode 100644 new mode 100755 diff --git a/DotBased.Logging.MEL/DotBased.Logging.MEL.csproj b/DotBased.Logging.MEL/DotBased.Logging.MEL.csproj old mode 100644 new mode 100755 diff --git a/DotBased.Logging.MEL/LoggerBuilderExtensions.cs b/DotBased.Logging.MEL/LoggerBuilderExtensions.cs old mode 100644 new mode 100755 diff --git a/DotBased.Logging.Serilog/BasedSerilog.cs b/DotBased.Logging.Serilog/BasedSerilog.cs old mode 100644 new mode 100755 diff --git a/DotBased.Logging.Serilog/BasedSerilogEnricher.cs b/DotBased.Logging.Serilog/BasedSerilogEnricher.cs old mode 100644 new mode 100755 diff --git a/DotBased.sln b/DotBased.sln index 0275d48..b867aa7 100755 --- a/DotBased.sln +++ b/DotBased.sln @@ -22,6 +22,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspNet", "AspNet", "{624E7B EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotBased.AspNet.Authority", "DotBased.AspNet.Authority\DotBased.AspNet.Authority.csproj", "{A3ADC9AF-39B7-4EC4-8022-946118A8C322}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotBased.Data", "DotBased.Data\DotBased.Data.csproj", "{2DF9FEEF-5A60-4B41-9B5F-F883DCE33EF4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -60,6 +62,10 @@ Global {A3ADC9AF-39B7-4EC4-8022-946118A8C322}.Debug|Any CPU.Build.0 = Debug|Any CPU {A3ADC9AF-39B7-4EC4-8022-946118A8C322}.Release|Any CPU.ActiveCfg = Release|Any CPU {A3ADC9AF-39B7-4EC4-8022-946118A8C322}.Release|Any CPU.Build.0 = Release|Any CPU + {2DF9FEEF-5A60-4B41-9B5F-F883DCE33EF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DF9FEEF-5A60-4B41-9B5F-F883DCE33EF4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DF9FEEF-5A60-4B41-9B5F-F883DCE33EF4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DF9FEEF-5A60-4B41-9B5F-F883DCE33EF4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {EBBDAF9A-BFC7-4BDC-8C51-0501B59A1DDC} = {2156FB93-C252-4B33-8A0C-73C82FABB163} @@ -69,5 +75,6 @@ Global {AC8343A5-7953-4E1D-A926-406BE4D7E819} = {DBDB4538-85D4-45AC-9E0A-A684467AEABA} {624E7B11-8A18-46E5-AB1F-6AF6097F9D4D} = {2156FB93-C252-4B33-8A0C-73C82FABB163} {A3ADC9AF-39B7-4EC4-8022-946118A8C322} = {624E7B11-8A18-46E5-AB1F-6AF6097F9D4D} + {2DF9FEEF-5A60-4B41-9B5F-F883DCE33EF4} = {2156FB93-C252-4B33-8A0C-73C82FABB163} EndGlobalSection EndGlobal diff --git a/DotBased/Objects/DbObjectAttribute.cs b/DotBased/Objects/DbObjectAttribute.cs old mode 100644 new mode 100755 diff --git a/DotBased/Objects/IObjectAttribute.cs b/DotBased/Objects/IObjectAttribute.cs old mode 100644 new mode 100755 diff --git a/DotBased/Objects/ObjectAttribute.cs b/DotBased/Objects/ObjectAttribute.cs old mode 100644 new mode 100755 diff --git a/TestWebApi/Program.cs b/TestWebApi/Program.cs old mode 100644 new mode 100755 diff --git a/TestWebApi/Properties/launchSettings.json b/TestWebApi/Properties/launchSettings.json old mode 100644 new mode 100755 diff --git a/TestWebApi/SeedAuthorityData.cs b/TestWebApi/SeedAuthorityData.cs old mode 100644 new mode 100755 diff --git a/TestWebApi/TestWebApi.csproj b/TestWebApi/TestWebApi.csproj old mode 100644 new mode 100755 diff --git a/TestWebApi/TestWebApi.http b/TestWebApi/TestWebApi.http old mode 100644 new mode 100755 diff --git a/TestWebApi/appsettings.Development.json b/TestWebApi/appsettings.Development.json old mode 100644 new mode 100755 diff --git a/TestWebApi/appsettings.json b/TestWebApi/appsettings.json old mode 100644 new mode 100755 diff --git a/obs_DotBased/.obsidian/app.json b/obs_DotBased/.obsidian/app.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/obs_DotBased/.obsidian/app.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/obs_DotBased/.obsidian/appearance.json b/obs_DotBased/.obsidian/appearance.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/obs_DotBased/.obsidian/appearance.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/obs_DotBased/.obsidian/core-plugins.json b/obs_DotBased/.obsidian/core-plugins.json new file mode 100644 index 0000000..436f43c --- /dev/null +++ b/obs_DotBased/.obsidian/core-plugins.json @@ -0,0 +1,30 @@ +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "properties": false, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": false +} \ No newline at end of file diff --git a/obs_DotBased/.obsidian/graph.json b/obs_DotBased/.obsidian/graph.json new file mode 100644 index 0000000..42a46ec --- /dev/null +++ b/obs_DotBased/.obsidian/graph.json @@ -0,0 +1,22 @@ +{ + "collapse-filter": true, + "search": "", + "showTags": false, + "showAttachments": false, + "hideUnresolved": false, + "showOrphans": true, + "collapse-color-groups": true, + "colorGroups": [], + "collapse-display": true, + "showArrow": false, + "textFadeMultiplier": 0, + "nodeSizeMultiplier": 1, + "lineSizeMultiplier": 1, + "collapse-forces": true, + "centerStrength": 0.518713248970312, + "repelStrength": 10, + "linkStrength": 1, + "linkDistance": 250, + "scale": 1, + "close": true +} \ No newline at end of file diff --git a/obs_DotBased/.obsidian/workspace.json b/obs_DotBased/.obsidian/workspace.json new file mode 100644 index 0000000..7819a34 --- /dev/null +++ b/obs_DotBased/.obsidian/workspace.json @@ -0,0 +1,186 @@ +{ + "main": { + "id": "036516b320d15f05", + "type": "split", + "children": [ + { + "id": "68f3abbbf106a47b", + "type": "tabs", + "children": [ + { + "id": "9629cc68ecd8963f", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "UserRepository" + } + } + ] + } + ], + "direction": "vertical" + }, + "left": { + "id": "97d2b7eaa5b0817b", + "type": "split", + "children": [ + { + "id": "4ab704d9f07468d7", + "type": "tabs", + "children": [ + { + "id": "2dcd0dffd753993c", + "type": "leaf", + "state": { + "type": "file-explorer", + "state": { + "sortOrder": "alphabetical" + }, + "icon": "lucide-folder-closed", + "title": "Files" + } + }, + { + "id": "4a5d90d4f8e6e8b9", + "type": "leaf", + "state": { + "type": "search", + "state": { + "query": "", + "matchingCase": false, + "explainSearch": false, + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical" + }, + "icon": "lucide-search", + "title": "Search" + } + }, + { + "id": "26ebe543611d3a9b", + "type": "leaf", + "state": { + "type": "bookmarks", + "state": {}, + "icon": "lucide-bookmark", + "title": "Bookmarks" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300 + }, + "right": { + "id": "37b39260b7304344", + "type": "split", + "children": [ + { + "id": "233acbe146cb7e31", + "type": "tabs", + "children": [ + { + "id": "61d17c9ee7d66c50", + "type": "leaf", + "state": { + "type": "backlink", + "state": { + "file": "Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md", + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-coming-in", + "title": "Backlinks for UserRepository" + } + }, + { + "id": "9edca2501ca8fc8d", + "type": "leaf", + "state": { + "type": "outgoing-link", + "state": { + "file": "Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md", + "linksCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-going-out", + "title": "Outgoing links from UserRepository" + } + }, + { + "id": "a0b5dc7ca04cc4f8", + "type": "leaf", + "state": { + "type": "tag", + "state": { + "sortOrder": "frequency", + "useHierarchy": true + }, + "icon": "lucide-tags", + "title": "Tags" + } + }, + { + "id": "25f7df275652ff82", + "type": "leaf", + "state": { + "type": "outline", + "state": { + "file": "Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md" + }, + "icon": "lucide-list", + "title": "Outline of UserRepository" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300, + "collapsed": true + }, + "left-ribbon": { + "hiddenItems": { + "switcher:Open quick switcher": false, + "graph:Open graph view": false, + "canvas:Create new canvas": false, + "daily-notes:Open today's daily note": false, + "templates:Insert template": false, + "command-palette:Open command palette": false + } + }, + "active": "9629cc68ecd8963f", + "lastOpenFiles": [ + "Modules/AspNet/DotBased.Authority/Repository.md", + "Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md", + "Modules/AspNet/DotBased.Authority/Repositories", + "Modules/AspNet/DotBased.Authority/Data diagram.canvas", + "Modules/AspNet/DotBased.Authority/Models/AuthorityAttribute.md", + "Modules/AspNet/DotBased.Authority/Models/AuthorityUser.md", + "Modules/AspNet/DotBased.Authority/Models/AuthorityRole.md", + "Modules/AspNet/DotBased.Authority/Models/AuthorityGroup.md", + "Modules/AspNet/DotBased.Authority/Models", + "Untitled.canvas", + "Modules/AspNet/DotBased.Authority.md", + "Modules/AspNet/DotBased.Authority", + "DotBased.md", + "Modules/Untitled", + "Modules/DotBased.Data", + "Modules/AspNet", + "Modules", + "Welcome.md" + ] +} \ No newline at end of file diff --git a/obs_DotBased/Modules/AspNet/DotBased.Authority/Data diagram.canvas b/obs_DotBased/Modules/AspNet/DotBased.Authority/Data diagram.canvas new file mode 100644 index 0000000..f1b2fb6 --- /dev/null +++ b/obs_DotBased/Modules/AspNet/DotBased.Authority/Data diagram.canvas @@ -0,0 +1,22 @@ +{ + "nodes":[ + {"id":"d06f84f5cb83d5b3","type":"file","file":"Modules/AspNet/DotBased.Authority/Models/AuthorityUser.md","x":-660,"y":-740,"width":400,"height":400}, + {"id":"20469f32c2b97d54","type":"file","file":"Modules/AspNet/DotBased.Authority/Models/AuthorityGroup.md","x":-180,"y":-740,"width":400,"height":400}, + {"id":"54394f02266f386b","x":-180,"y":-1480,"width":400,"height":400,"type":"file","file":"Modules/AspNet/DotBased.Authority/Models/AuthorityAttribute.md"}, + {"id":"e38f59f13e522e10","x":-340,"y":-190,"width":250,"height":60,"color":"5","type":"text","text":"#### UsersGroups"}, + {"id":"cfabf37254bf9b94","x":-340,"y":-40,"width":250,"height":60,"color":"5","type":"text","text":"#### UserRoles"}, + {"id":"d306221d0fc3815f","x":300,"y":-740,"width":400,"height":400,"type":"file","file":"Modules/AspNet/DotBased.Authority/Models/AuthorityRole.md"}, + {"id":"3c9bc17b3a311b43","x":140,"y":-190,"width":250,"height":60,"color":"5","type":"text","text":"#### GroupsRoles"} + ], + "edges":[ + {"id":"591458f8b454aec0","fromNode":"d06f84f5cb83d5b3","fromSide":"bottom","toNode":"e38f59f13e522e10","toSide":"left"}, + {"id":"a5758a4bbb7fe559","fromNode":"20469f32c2b97d54","fromSide":"bottom","toNode":"e38f59f13e522e10","toSide":"right"}, + {"id":"86bf0eb2ae0fcfdc","fromNode":"d06f84f5cb83d5b3","fromSide":"bottom","toNode":"cfabf37254bf9b94","toSide":"left"}, + {"id":"64a58417d746183f","fromNode":"d306221d0fc3815f","fromSide":"bottom","toNode":"cfabf37254bf9b94","toSide":"right"}, + {"id":"e5825aa1415a34c4","fromNode":"20469f32c2b97d54","fromSide":"bottom","toNode":"3c9bc17b3a311b43","toSide":"left"}, + {"id":"0aa9af60a44a83dd","fromNode":"d306221d0fc3815f","fromSide":"bottom","toNode":"3c9bc17b3a311b43","toSide":"right"}, + {"id":"1958b5d5b82c10d7","fromNode":"54394f02266f386b","fromSide":"bottom","toNode":"d06f84f5cb83d5b3","toSide":"top"}, + {"id":"c71f1f3fc3e239f3","fromNode":"54394f02266f386b","fromSide":"bottom","toNode":"20469f32c2b97d54","toSide":"top"}, + {"id":"bd026c0a356725a5","fromNode":"54394f02266f386b","fromSide":"bottom","toNode":"d306221d0fc3815f","toSide":"top"} + ] +} \ No newline at end of file diff --git a/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityAttribute.md b/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityAttribute.md new file mode 100644 index 0000000..a3fa43b --- /dev/null +++ b/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityAttribute.md @@ -0,0 +1,2 @@ +Attributes to store some extra metadata. +One attribute per table entry. \ No newline at end of file diff --git a/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityGroup.md b/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityGroup.md new file mode 100644 index 0000000..0c4ca5a --- /dev/null +++ b/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityGroup.md @@ -0,0 +1,2 @@ +Groups can have multiple [[AuthorityUser]]s and holds [[AuthorityRole]]s . +Can be extended with extra data from [[AuthorityAttribute]]s \ No newline at end of file diff --git a/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityRole.md b/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityRole.md new file mode 100644 index 0000000..f2bf9f3 --- /dev/null +++ b/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityRole.md @@ -0,0 +1 @@ +Roles used for permissions and specific [[AuthorityAttribute]]s. Can get added to [[AuthorityUser]] and [[AuthorityRole]] \ No newline at end of file diff --git a/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityUser.md b/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityUser.md new file mode 100644 index 0000000..2a576e0 --- /dev/null +++ b/obs_DotBased/Modules/AspNet/DotBased.Authority/Models/AuthorityUser.md @@ -0,0 +1 @@ +An user can be in multiple [[AuthorityGroup]]s, can have own [[AuthorityRole]]s and [[AuthorityAttribute]]s. \ No newline at end of file diff --git a/obs_DotBased/Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md b/obs_DotBased/Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md new file mode 100644 index 0000000..62f8751 --- /dev/null +++ b/obs_DotBased/Modules/AspNet/DotBased.Authority/Repositories/UserRepository.md @@ -0,0 +1,6 @@ +Handles the db for user models. + +## GetUsers (list) +- Search +- Paging (limit, offset) +- Returns useritem \ No newline at end of file diff --git a/obs_DotBased/Modules/AspNet/DotBased.Authority/Repository.md b/obs_DotBased/Modules/AspNet/DotBased.Authority/Repository.md new file mode 100644 index 0000000..e69de29