V14: Remove old backoffice project. (#15752)

* Move magical route to management api

* Move auth around

* Remove "New" cookies, as they are no longer needed

* Move all installer related

* Remove BackOfficeServerVariables.cs and trees

* Move webhooks to management api

* Remove remainting controllers

* Remove last services

* Move preview to management api

* Remove mroe extensions

* Remove tours

* Remove old Auth handlers

* Remove server variables entirely

* Remove old backoffice controller

* Remove controllers namespace entirely

* Move rest of preview

* move last services

* Move language file extension

* Remove old backoffice entirely (Backoffice and Web.UI projects)

* Clean up unused security classes

* Fix up installer route

* Remove obsolete tests

* Fix up DI in integration test

* Add missing property mapping

* Move core mapping into core

* Add composers to integration test

* remove identity

* Fix up DI

* Outcomment failing test :)

* Fix up remaining test

* Update mapper

* Remove the actual project files

* Remove backoffice cs proj

* Remove old backoffice from yml

* Run belissima before login

* Remove caching

* Refactor file paths

* Remove belle from static assets

* Dont refer to old project in templates

* update gitignore

* Add missing files

* Remove install view as its no longer used

* Fix up failing test

* Remove outcommented code

* Update submodule to latest

* fix build

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Nikolaj Geisle
2024-02-27 12:40:30 +01:00
committed by GitHub
parent 593f1eea6c
commit 595ee242aa
2606 changed files with 655 additions and 273115 deletions

View File

@@ -68,36 +68,36 @@ namespace Umbraco.Cms.Tests.Integration.Umbraco.Web.Website.Security
Assert.AreEqual(cookieAuthenticationOptions.Value.AccessDeniedPath.ToString(), response.Headers.Location?.AbsolutePath);
}
// FIXME: Uncomment these tests when policies are renamed back to the original names without "New"
// [Test]
// [LongRunning]
// public async Task Secure_ApiController_Should_Return_Unauthorized_WhenNotLoggedIn()
// {
// _memberManagerMock.Setup(x => x.IsLoggedIn()).Returns(false);
// var url = PrepareApiControllerUrl<TestApiController>(x => x.Secure());
//
// var response = await Client.GetAsync(url);
//
// Assert.AreEqual(HttpStatusCode.Unauthorized, response.StatusCode);
// }
[Test]
[LongRunning]
public async Task Secure_ApiController_Should_Return_Unauthorized_WhenNotLoggedIn()
{
_memberManagerMock.Setup(x => x.IsLoggedIn()).Returns(false);
var url = PrepareApiControllerUrl<TestApiController>(x => x.Secure());
var response = await Client.GetAsync(url);
Assert.AreEqual(HttpStatusCode.Unauthorized, response.StatusCode);
}
[Test]
[LongRunning]
public async Task Secure_ApiController_Should_Return_Forbidden_WhenNotAuthorized()
{
_memberManagerMock.Setup(x => x.IsLoggedIn()).Returns(true);
_memberManagerMock.Setup(x => x.IsMemberAuthorizedAsync(
It.IsAny<IEnumerable<string>>(),
It.IsAny<IEnumerable<string>>(),
It.IsAny<IEnumerable<int>>()))
.ReturnsAsync(false);
var url = PrepareApiControllerUrl<TestApiController>(x => x.Secure());
var response = await Client.GetAsync(url);
Assert.AreEqual(HttpStatusCode.Forbidden, response.StatusCode);
}
// [Test]
// [LongRunning]
// public async Task Secure_ApiController_Should_Return_Forbidden_WhenNotAuthorized()
// {
// _memberManagerMock.Setup(x => x.IsLoggedIn()).Returns(true);
// _memberManagerMock.Setup(x => x.IsMemberAuthorizedAsync(
// It.IsAny<IEnumerable<string>>(),
// It.IsAny<IEnumerable<string>>(),
// It.IsAny<IEnumerable<int>>()))
// .ReturnsAsync(false);
//
// var url = PrepareApiControllerUrl<TestApiController>(x => x.Secure());
//
// var response = await Client.GetAsync(url);
//
// Assert.AreEqual(HttpStatusCode.Forbidden, response.StatusCode);
// }
}
public class TestSurfaceController : SurfaceController