Implements Public Access in netcore (#10137)
* Getting new netcore PublicAccessChecker in place * Adds full test coverage for PublicAccessChecker * remove PublicAccessComposer * adjust namespaces, ensure RoleManager works, separate public access controller, reduce content controller * Implements the required methods on IMemberManager, removes old migrated code * Updates routing to be able to re-route, Fixes middleware ordering ensuring endpoints are last, refactors pipeline options, adds public access middleware, ensures public access follows all hops * adds note * adds note * Cleans up ext methods, ensures that members identity is added on both front-end and back ends. updates how UmbracoApplicationBuilder works in that it explicitly starts endpoints at the time of calling. * Changes name to IUmbracoEndpointBuilder * adds note * Fixing tests, fixing error describers so there's 2x one for back office, one for members, fixes TryConvertTo, fixes login redirect * fixing build * Fixes keepalive, fixes PublicAccessMiddleware to not throw, updates startup code to be more clear and removes magic that registers middleware. * adds note * removes unused filter, fixes build * fixes WebPath and tests * Looks up entities in one query * remove usings * Fix test, remove stylesheet * Set status code before we write to response to avoid error * Ensures that users and members are validated when logging in. Shares more code between users and members. * Fixes RepositoryCacheKeys to ensure the keys are normalized * oops didn't mean to commit this * Fix casing issues with caching, stop boxing value types for all cache operations, stop re-creating string keys in DefaultRepositoryCachePolicy * bah, far out this keeps getting recommitted. sorry Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Cms.Core.Models.PublishedContent;
|
||||
|
||||
namespace Umbraco.Cms.Core.Routing
|
||||
{
|
||||
@@ -24,18 +25,28 @@ namespace Umbraco.Cms.Core.Routing
|
||||
Task<IPublishedRequest> RouteRequestAsync(IPublishedRequestBuilder request, RouteRequestOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the request to "not found".
|
||||
/// Updates the request to use the specified <see cref="IPublishedContent"/> item, or NULL
|
||||
/// </summary>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <remarks>
|
||||
/// <returns>A new <see cref="IPublishedRequestBuilder"/> based on values from the original <see cref="IPublishedRequest"/></returns>
|
||||
/// <para>This method is invoked when the pipeline decides it cannot render
|
||||
/// <returns>
|
||||
/// A new <see cref="IPublishedRequest"/> based on values from the original <see cref="IPublishedRequest"/>
|
||||
/// and with the re-routed values based on the passed in <see cref="IPublishedContent"/>
|
||||
/// </returns>
|
||||
/// <para>
|
||||
/// This method is used for 2 cases:
|
||||
/// - When the rendering content needs to change due to Public Access rules.
|
||||
/// - When there is nothing to render due to circumstances such as no template files. In this case, NULL is used as the parameter.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This method is invoked when the pipeline decides it cannot render
|
||||
/// the request, for whatever reason, and wants to force it to be re-routed
|
||||
/// and rendered as if no document were found (404).</para>
|
||||
/// <para>This occurs if there is no template found and route hijacking was not matched.
|
||||
/// and rendered as if no document were found (404).
|
||||
/// This occurs if there is no template found and route hijacking was not matched.
|
||||
/// In that case it's the same as if there was no content which means even if there was
|
||||
/// content matched we want to run the request through the last chance finders.</para>
|
||||
/// content matched we want to run the request through the last chance finders.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
IPublishedRequestBuilder UpdateRequestToNotFound(IPublishedRequest request);
|
||||
Task<IPublishedRequest> UpdateRequestAsync(IPublishedRequest request, IPublishedContent publishedContent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user