From 7517376ed0cb7423ae50329d5552f9893799de35 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Thu, 29 Feb 2024 15:21:38 +0100 Subject: [PATCH 1/6] Write shorter sentences --- 13/umbraco-cms/reference/routing/authorized.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/13/umbraco-cms/reference/routing/authorized.md b/13/umbraco-cms/reference/routing/authorized.md index 6cc2218e7cb..a4dacc94e4d 100644 --- a/13/umbraco-cms/reference/routing/authorized.md +++ b/13/umbraco-cms/reference/routing/authorized.md @@ -108,8 +108,8 @@ public class MyController : UmbracoAuthorizedController {% hint style="info" %} -The route must be prefixed with Umbraco path which is configurable and resolved with `GetUmbracoMvcArea()` from `IGlobalSettings` and then by "/backoffice" in order for Umbraco to check user authentication. +The route must be prefixed with the Umbraco path, which is configurable and resolved with `GetUmbracoMvcArea()` from `IGlobalSettings`. Then, it should be followed by "/backoffice" in order for Umbraco to check user authentication. {% endhint %} ### What about Surface Controllers? -Surface Controllers should not be used in the backoffice. Surface Controllers are not designed to work with the backoffice, they are not meant to be used there and will not be supported being used there. +Surface Controllers should not be used in the backoffice. Surface Controllers are not designed to work with the backoffice. They are not meant to be used there and will not be supported being used there. From 3b2ea0b31b0e36b75dae531e93a3df0e5ce63556 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Thu, 29 Feb 2024 15:23:19 +0100 Subject: [PATCH 2/6] Update v10 & 12 --- 10/umbraco-cms/reference/routing/authorized.md | 4 ++-- 12/umbraco-cms/reference/routing/authorized.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/10/umbraco-cms/reference/routing/authorized.md b/10/umbraco-cms/reference/routing/authorized.md index 706e5e5016c..d982834e8c9 100644 --- a/10/umbraco-cms/reference/routing/authorized.md +++ b/10/umbraco-cms/reference/routing/authorized.md @@ -107,8 +107,8 @@ namespace Umbraco.Cms.Web.UI.NetCore {% hint style="info" %} -The route must be prefixed with Umbraco path which is configurable and resolved with `GetUmbracoMvcArea()` from `IGlobalSettings` and then by "/backoffice" in order for Umbraco to check user authentication. +The route must be prefixed with the Umbraco path, which is configurable and resolved with `GetUmbracoMvcArea()` from `IGlobalSettings`. Then, it should be followed by "/backoffice" in order for Umbraco to check user authentication. {% endhint %} ### What about Surface Controllers? -Surface Controllers should not be used in the backoffice. Surface Controllers are not designed to work with the backoffice, they are not meant to be used there and will not be supported being used there. +Surface Controllers should not be used in the backoffice. Surface Controllers are not designed to work with the backoffice. They are not meant to be used there and will not be supported being used there. diff --git a/12/umbraco-cms/reference/routing/authorized.md b/12/umbraco-cms/reference/routing/authorized.md index 3982f064615..fad2bd91c76 100644 --- a/12/umbraco-cms/reference/routing/authorized.md +++ b/12/umbraco-cms/reference/routing/authorized.md @@ -108,8 +108,8 @@ public class MyController : UmbracoAuthorizedController {% hint style="info" %} -The route must be prefixed with Umbraco path which is configurable and resolved with `GetUmbracoMvcArea()` from `IGlobalSettings` and then by "/backoffice" in order for Umbraco to check user authentication. +The route must be prefixed with the Umbraco path, which is configurable and resolved with `GetUmbracoMvcArea()` from `IGlobalSettings`. Then, it should be followed by "/backoffice" in order for Umbraco to check user authentication. {% endhint %} ### What about Surface Controllers? -Surface Controllers should not be used in the backoffice. Surface Controllers are not designed to work with the backoffice, they are not meant to be used there and will not be supported being used there. +Surface Controllers should not be used in the backoffice. Surface Controllers are not designed to work with the backoffice. They are not meant to be used there and will not be supported being used there. From 8d0c56bac8f6b79d63900816d3ff3115ba1433bf Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Thu, 29 Feb 2024 15:23:39 +0100 Subject: [PATCH 3/6] url to URL --- 10/umbraco-cms/reference/routing/authorized.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10/umbraco-cms/reference/routing/authorized.md b/10/umbraco-cms/reference/routing/authorized.md index d982834e8c9..795ad6e3b0c 100644 --- a/10/umbraco-cms/reference/routing/authorized.md +++ b/10/umbraco-cms/reference/routing/authorized.md @@ -80,7 +80,7 @@ public static void MapUmbracoRoute( * The generic type argument is the contoller you wish to route, in this case `MyController`. * `rootSegment` - The first part of the pattern, since this is an authorized controller it has to be `umbraco/backoffice`. * `areaName` - The name of the area the controller should be routed through, an empty string signifies no area. -* `prefixPathSegment` - Prefix to be applied to the rootSegment, we know this from api controllers where the prefix is `api`, in this case since the controller is in an area we will also prefix the area name to the url, so the final path pattern will be `umbraco/backoffice/mypackagename/{controllerName}/{action}/{id?}`. +* `prefixPathSegment` - Prefix to be applied to the rootSegment, we know this from api controllers where the prefix is `api`, in this case since the controller is in an area we will also prefix the area name to the URL, so the final path pattern will be `umbraco/backoffice/mypackagename/{controllerName}/{action}/{id?}`. * `defaultAction` - If this is not null or an empty string the request will automatically be routed to the specified action, so in this case `umbraco/backoffice/mypackagename/{controllerName}` will route to the index action. * `includeControllerNameInRoute` - If this is false the controller name will be excluded from the route, so in this case the route would be `umbraco/backoffice/mypackagename/{action}/{id?}` if this was set to false. * `constraints` - Any routing constraints passed to this will be used when mapping the route see [Microsoft documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-5.0#route-constraint-reference) for more information. From d1e4b21bffe8c5da010c5cdb8e5b4f21f2a103bf Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Thu, 29 Feb 2024 15:27:49 +0100 Subject: [PATCH 4/6] Remove completely --- 10/umbraco-cms/reference/routing/authorized.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10/umbraco-cms/reference/routing/authorized.md b/10/umbraco-cms/reference/routing/authorized.md index 795ad6e3b0c..9930a9267c8 100644 --- a/10/umbraco-cms/reference/routing/authorized.md +++ b/10/umbraco-cms/reference/routing/authorized.md @@ -86,7 +86,7 @@ public static void MapUmbracoRoute( * `constraints` - Any routing constraints passed to this will be used when mapping the route see [Microsoft documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-5.0#route-constraint-reference) for more information. -Using the `MapUmbracoRoute` extension method is completely optional though, it's just a neat helper to ensure controllers get routed in the same way. It's very important to note though that if your controller uses an area, like in this example, you need to specify this on your controller using the `Area` attribute, this is not an Umbraco specific thing though, in this example the controller looks like this: +Using the `MapUmbracoRoute` extension method is optional though, it's just a neat helper to ensure controllers get routed in the same way. It's very important to note though that if your controller uses an area, like in this example, you need to specify this on your controller using the `Area` attribute, this is not an Umbraco specific thing though, in this example the controller looks like this: ```csharp using Microsoft.AspNetCore.Mvc; From 401f43b14721d49af2e781a03efaca0e8fa04e04 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Thu, 29 Feb 2024 15:27:59 +0100 Subject: [PATCH 5/6] Remove just --- 10/umbraco-cms/reference/routing/authorized.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10/umbraco-cms/reference/routing/authorized.md b/10/umbraco-cms/reference/routing/authorized.md index 9930a9267c8..c03dfcdaa0a 100644 --- a/10/umbraco-cms/reference/routing/authorized.md +++ b/10/umbraco-cms/reference/routing/authorized.md @@ -86,7 +86,7 @@ public static void MapUmbracoRoute( * `constraints` - Any routing constraints passed to this will be used when mapping the route see [Microsoft documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-5.0#route-constraint-reference) for more information. -Using the `MapUmbracoRoute` extension method is optional though, it's just a neat helper to ensure controllers get routed in the same way. It's very important to note though that if your controller uses an area, like in this example, you need to specify this on your controller using the `Area` attribute, this is not an Umbraco specific thing though, in this example the controller looks like this: +Using the `MapUmbracoRoute` extension method is optional though, it's a neat helper to ensure controllers get routed in the same way. It's very important to note though that if your controller uses an area, like in this example, you need to specify this on your controller using the `Area` attribute, this is not an Umbraco specific thing though, in this example the controller looks like this: ```csharp using Microsoft.AspNetCore.Mvc; From 8934495025f2b6cc547a1aa70c1aa4d56985ca21 Mon Sep 17 00:00:00 2001 From: Erik-Jan Westendorp Date: Thu, 29 Feb 2024 15:29:11 +0100 Subject: [PATCH 6/6] Update v10 --- 10/umbraco-cms/reference/routing/authorized.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/10/umbraco-cms/reference/routing/authorized.md b/10/umbraco-cms/reference/routing/authorized.md index c03dfcdaa0a..d11d56f12e3 100644 --- a/10/umbraco-cms/reference/routing/authorized.md +++ b/10/umbraco-cms/reference/routing/authorized.md @@ -85,8 +85,7 @@ public static void MapUmbracoRoute( * `includeControllerNameInRoute` - If this is false the controller name will be excluded from the route, so in this case the route would be `umbraco/backoffice/mypackagename/{action}/{id?}` if this was set to false. * `constraints` - Any routing constraints passed to this will be used when mapping the route see [Microsoft documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-5.0#route-constraint-reference) for more information. - -Using the `MapUmbracoRoute` extension method is optional though, it's a neat helper to ensure controllers get routed in the same way. It's very important to note though that if your controller uses an area, like in this example, you need to specify this on your controller using the `Area` attribute, this is not an Umbraco specific thing though, in this example the controller looks like this: +Using the `MapUmbracoRoute` extension method is optional though, it's a neat helper to ensure controllers get routed in the same way. If your controller uses an area, like in this example, you need to specify this using the `Area` attribute. In this example the controller looks like this: ```csharp using Microsoft.AspNetCore.Mvc;