V14: Public access controller (#14501)
* Implement GetEntryByContentKey * Implement PublicAccessResponseModel * Implement IPublicAccessPresentationFactory * Rename MemberGroupItemReponseModel to MemberGroupItemResponseModel * Refactor PublicAccessResponseModel to use Ids instead of entire content items * Return attempt instead of PresentationModel * Add missing statuses to PublicAccessOperationStatusResult * Implement PublicAccessDocumentController.cs * Refacotr PublicAccessResponseModel to use a base model * Add CreatePublicAccessEntry method * Refactor AccessRequestModel to use names not ids :( * Rename ErrorPageNotFound to ErrorNodeNotFound * Implement new SaveAsync method * Introduce more OperationResults * Implement PublicAccessEntrySlim * Implement SaveAsync * Remove CreatePublicAccessEntry from presentation factory * Rename to CreateAsync * Implement UpdateAsync * Rename to async * Implement CreatePublicAccessEntry * Implement update endpoint * remove PublicAccessEntrySlim mapping * implement CreatePublicAccessEntrySlim method * Refactor UpdateAsync * Remove ContentId from request model as it should be in the request * Use new service layer * Amend method name in update controller * Refactor create public access entry to use async method and return entity * Refactor to use saveAsync method instead of synchronously * Use presentation factory instead of mapping * Implement deleteAsync endpoint * Add produces response type * Refactor mapping to not use UmbracoMapper, as that causes errors * Update OpenApi.json * Refactor out variables to intermediate object * Validate that groups and names are not specified at the same time * Make presentation factory not async * Minor cleanup --------- Co-authored-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
This commit is contained in:
14
src/Umbraco.Core/Models/PublicAccessEntrySlim.cs
Normal file
14
src/Umbraco.Core/Models/PublicAccessEntrySlim.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Umbraco.Cms.Core.Models;
|
||||
|
||||
public class PublicAccessEntrySlim
|
||||
{
|
||||
public Guid ContentId { get; set; }
|
||||
|
||||
public string[] MemberUserNames { get; set; } = Array.Empty<string>();
|
||||
|
||||
public string[] MemberGroupNames { get; set; } = Array.Empty<string>();
|
||||
|
||||
public Guid LoginPageId { get; set; }
|
||||
|
||||
public Guid ErrorPageId { get; set; }
|
||||
}
|
||||
11
src/Umbraco.Core/Models/PublicAccessNodesValidationResult.cs
Normal file
11
src/Umbraco.Core/Models/PublicAccessNodesValidationResult.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Umbraco.Cms.Core.Models;
|
||||
|
||||
public class PublicAccessNodesValidationResult
|
||||
{
|
||||
public IContent? ProtectedNode { get; set; }
|
||||
|
||||
public IContent? LoginNode { get; set; }
|
||||
|
||||
public IContent? ErrorNode { get; set; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user