From 73e06b68dd3c6486a1326926f7293fc0148cc18b Mon Sep 17 00:00:00 2001 From: Francis Pion Date: Wed, 29 Jan 2025 23:08:33 -0500 Subject: [PATCH] Release 0.2.3 --- CHANGELOG.md | 9 ++++++++- backend/src/Logitar.Cms.Core/Logitar.Cms.Core.csproj | 6 +++--- backend/src/Logitar.Cms.Core/Users/IUserQuerier.cs | 1 + .../Logitar.Cms.Infrastructure.PostgreSQL.csproj | 6 +++--- .../Logitar.Cms.Infrastructure.SqlServer.csproj | 6 +++--- .../Logitar.Cms.Infrastructure.csproj | 6 +++--- .../Queriers/UserQuerier.cs | 11 +++++++++++ backend/src/Logitar.Cms.Web/Logitar.Cms.Web.csproj | 6 +++--- backend/src/Logitar.Cms/Constants/Api.cs | 2 +- frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- 11 files changed, 39 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e31a901..8f449116 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Nothing yet. +## [0.2.3] - 2025-01-29 + +### Added + +- Read user by unique name. + ## [0.2.2] - 2025-01-29 ### Fixed @@ -53,7 +59,8 @@ Nothing yet. Initial release, including basic account management, languages, 8 field types, content types & field definitions, and contents, invariant & translated, field values, indices and published contents. -[unreleased]: https://github.com/Logitar/CMS/compare/v0.2.2...HEAD +[unreleased]: https://github.com/Logitar/CMS/compare/v0.2.3...HEAD +[0.2.3]: https://github.com/Logitar/CMS/compare/v0.2.2...v0.2.3 [0.2.2]: https://github.com/Logitar/CMS/compare/v0.2.1...v0.2.2 [0.2.1]: https://github.com/Logitar/CMS/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/Logitar/CMS/compare/v0.1.0...v0.2.0 diff --git a/backend/src/Logitar.Cms.Core/Logitar.Cms.Core.csproj b/backend/src/Logitar.Cms.Core/Logitar.Cms.Core.csproj index a07babf7..04fef1f4 100644 --- a/backend/src/Logitar.Cms.Core/Logitar.Cms.Core.csproj +++ b/backend/src/Logitar.Cms.Core/Logitar.Cms.Core.csproj @@ -15,14 +15,14 @@ README.md https://github.com/Logitar/CMS git - 0.2.2.0 + 0.2.3.0 $(AssemblyVersion) LICENSE True - 0.2.2 + 0.2.3 en-CA False - Fixed empty field value descriptions. + Implement read user by unique name. logitar;content;management;system;domain;application;business;core;logic https://github.com/Logitar/CMS/tree/main/backend/src/Logitar.Cms.Core diff --git a/backend/src/Logitar.Cms.Core/Users/IUserQuerier.cs b/backend/src/Logitar.Cms.Core/Users/IUserQuerier.cs index 8fbd0095..68fc353d 100644 --- a/backend/src/Logitar.Cms.Core/Users/IUserQuerier.cs +++ b/backend/src/Logitar.Cms.Core/Users/IUserQuerier.cs @@ -13,4 +13,5 @@ public interface IUserQuerier Task ReadAsync(User user, CancellationToken cancellationToken = default); Task ReadAsync(UserId id, CancellationToken cancellationToken = default); Task ReadAsync(Guid id, CancellationToken cancellationToken = default); + Task ReadAsync(string uniqueName, CancellationToken cancellationToken = default); } diff --git a/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Logitar.Cms.Infrastructure.PostgreSQL.csproj b/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Logitar.Cms.Infrastructure.PostgreSQL.csproj index 5427ab35..33d08007 100644 --- a/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Logitar.Cms.Infrastructure.PostgreSQL.csproj +++ b/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Logitar.Cms.Infrastructure.PostgreSQL.csproj @@ -15,14 +15,14 @@ README.md https://github.com/Logitar/CMS git - 0.2.2.0 + 0.2.3.0 $(AssemblyVersion) LICENSE True - 0.2.2 + 0.2.3 en-CA False - Fixed empty field value descriptions. + Implement read user by unique name. logitar;cms;efcore;sqlserver;store https://github.com/Logitar/CMS/tree/main/backend/src/Logitar.Cms.Infrastructure.SqlServer diff --git a/backend/src/Logitar.Cms.Infrastructure.SqlServer/Logitar.Cms.Infrastructure.SqlServer.csproj b/backend/src/Logitar.Cms.Infrastructure.SqlServer/Logitar.Cms.Infrastructure.SqlServer.csproj index 1c34b905..89a8700e 100644 --- a/backend/src/Logitar.Cms.Infrastructure.SqlServer/Logitar.Cms.Infrastructure.SqlServer.csproj +++ b/backend/src/Logitar.Cms.Infrastructure.SqlServer/Logitar.Cms.Infrastructure.SqlServer.csproj @@ -15,14 +15,14 @@ README.md https://github.com/Logitar/CMS git - 0.2.2.0 + 0.2.3.0 $(AssemblyVersion) LICENSE True - 0.2.2 + 0.2.3 en-CA False - Fixed empty field value descriptions. + Implement read user by unique name. logitar;cms;efcore;sqlserver;store https://github.com/Logitar/CMS/tree/main/backend/src/Logitar.Cms.Infrastructure.SqlServer diff --git a/backend/src/Logitar.Cms.Infrastructure/Logitar.Cms.Infrastructure.csproj b/backend/src/Logitar.Cms.Infrastructure/Logitar.Cms.Infrastructure.csproj index a4189440..b07a753f 100644 --- a/backend/src/Logitar.Cms.Infrastructure/Logitar.Cms.Infrastructure.csproj +++ b/backend/src/Logitar.Cms.Infrastructure/Logitar.Cms.Infrastructure.csproj @@ -15,14 +15,14 @@ README.md https://github.com/Logitar/CMS git - 0.2.2.0 + 0.2.3.0 $(AssemblyVersion) LICENSE True - 0.2.2 + 0.2.3 en-CA False - Fixed empty field value descriptions. + Implement read user by unique name. logitar;content;management;system;infrastructure;logic;caching;persistence https://github.com/Logitar/CMS/tree/main/backend/src/Logitar.Cms.Infrastructure diff --git a/backend/src/Logitar.Cms.Infrastructure/Queriers/UserQuerier.cs b/backend/src/Logitar.Cms.Infrastructure/Queriers/UserQuerier.cs index 486789d4..e3ca7858 100644 --- a/backend/src/Logitar.Cms.Infrastructure/Queriers/UserQuerier.cs +++ b/backend/src/Logitar.Cms.Infrastructure/Queriers/UserQuerier.cs @@ -60,6 +60,17 @@ public async Task ReadAsync(User user, CancellationToken cancellation return user == null ? null : await MapAsync(user, cancellationToken); } + public async Task ReadAsync(string uniqueName, CancellationToken cancellationToken) + { + string uniqueNameNormalized = Helper.Normalize(uniqueName); + + UserEntity? user = await _users.AsNoTracking() + .Include(x => x.Identifiers) + .Include(x => x.Roles) + .SingleOrDefaultAsync(x => x.UniqueNameNormalized == uniqueNameNormalized, cancellationToken); + + return user == null ? null : await MapAsync(user, cancellationToken); + } private async Task MapAsync(UserEntity user, CancellationToken cancellationToken) { diff --git a/backend/src/Logitar.Cms.Web/Logitar.Cms.Web.csproj b/backend/src/Logitar.Cms.Web/Logitar.Cms.Web.csproj index 21d78404..39919005 100644 --- a/backend/src/Logitar.Cms.Web/Logitar.Cms.Web.csproj +++ b/backend/src/Logitar.Cms.Web/Logitar.Cms.Web.csproj @@ -16,14 +16,14 @@ README.md https://github.com/Logitar/CMS git - 0.2.2.0 + 0.2.3.0 $(AssemblyVersion) LICENSE True - 0.2.2 + 0.2.3 en-CA False - Fixed empty field value descriptions. + Implement read user by unique name. logitar;cms;web;interface;rest;api;controller;filter;razor;view https://github.com/Logitar/CMS/tree/main/backend/src/Logitar.Cms.Web diff --git a/backend/src/Logitar.Cms/Constants/Api.cs b/backend/src/Logitar.Cms/Constants/Api.cs index b3b72d75..dea8b3ae 100644 --- a/backend/src/Logitar.Cms/Constants/Api.cs +++ b/backend/src/Logitar.Cms/Constants/Api.cs @@ -3,5 +3,5 @@ internal static class Api { public const string Title = "CMS API"; - public static readonly Version Version = new(0, 2, 2); + public static readonly Version Version = new(0, 2, 3); } diff --git a/frontend/package-lock.json b/frontend/package-lock.json index c6240d87..6d6658d1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "logitar-cms", - "version": "0.2.2", + "version": "0.2.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "logitar-cms", - "version": "0.2.2", + "version": "0.2.3", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.5.2", "@fortawesome/free-brands-svg-icons": "^6.5.2", diff --git a/frontend/package.json b/frontend/package.json index cc060f22..9323c5cc 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "logitar-cms", - "version": "0.2.2", + "version": "0.2.3", "private": true, "type": "module", "scripts": {