diff --git a/src/Umbraco.Web.BackOffice/Controllers/LanguageController.cs b/src/Umbraco.Web.BackOffice/Controllers/LanguageController.cs index cef2352ab4..4e5ed094ac 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/LanguageController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/LanguageController.cs @@ -18,7 +18,6 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers; /// Backoffice controller supporting the dashboard for language administration. /// [PluginController(Constants.Web.Mvc.BackOfficeApiArea)] -[Authorize(Policy = AuthorizationPolicies.SectionAccessSettings)] public class LanguageController : UmbracoAuthorizedJsonController { private readonly ILocalizationService _localizationService; @@ -36,7 +35,7 @@ public class LanguageController : UmbracoAuthorizedJsonController /// /// [HttpGet] - public IDictionary GetAllCultures() + [Authorize(Policy = AuthorizationPolicies.TreeAccessLanguages)]public IDictionary GetAllCultures() => CultureInfo.GetCultures(CultureTypes.AllCultures).DistinctBy(x => x.Name).OrderBy(x => x.EnglishName).ToDictionary(x => x.Name, x => x.EnglishName); /// @@ -44,6 +43,7 @@ public class LanguageController : UmbracoAuthorizedJsonController /// /// [HttpGet] + [Authorize(Policy = AuthorizationPolicies.SectionAccessContent)] public IEnumerable? GetAllLanguages() { IEnumerable allLanguages = _localizationService.GetAllLanguages(); @@ -52,6 +52,7 @@ public class LanguageController : UmbracoAuthorizedJsonController } [HttpGet] + [Authorize(Policy = AuthorizationPolicies.TreeAccessLanguages)] public ActionResult GetLanguage(int id) { ILanguage? lang = _localizationService.GetLanguageById(id); diff --git a/src/Umbraco.Web.BackOffice/Controllers/StylesheetController.cs b/src/Umbraco.Web.BackOffice/Controllers/StylesheetController.cs index 616edfa04f..1fc5f641f6 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/StylesheetController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/StylesheetController.cs @@ -14,7 +14,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers; /// The API controller used for retrieving available stylesheets /// [PluginController(Constants.Web.Mvc.BackOfficeApiArea)] -[Authorize(Policy = AuthorizationPolicies.SectionAccessSettings)] +[Authorize(Policy = AuthorizationPolicies.SectionAccessContent)] public class StylesheetController : UmbracoAuthorizedJsonController { private readonly IFileService _fileService;