Commit Graph

44 Commits

Author SHA1 Message Date
Bjarke Berg
12abd883a9 Member 2FA (#11889)
* Bugfix - Take ufprt from form data if the request has form content type, otherwise fallback to use the query

* External linking for members

* Changed migration to reuse old table

* removed unnecessary web.config files

* Cleanup

* Extracted class to own file

* Clean up

* Rollback changes to Umbraco.Web.UI.csproj

* Fixed migration for SqlCE

* Added 2fa for members

* Change notification handler to be on deleted

* Update src/Umbraco.Infrastructure/Security/MemberUserStore.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* updated snippets

* Fixed issue with errors not shown on member linking

* fixed issue with errors

* clean up

* Fix issue where external logins could not be used to upgrade Umbraco, because the externalLogin table was expected to look different. (Like after the migration)

* Fixed issue in Ignore legacy column now using result column.

* Updated 2fa for members + publish notification when 2fa is requested.

* Changed so only Members out of box supports 2fa

* Cleanup

* rollback of csproj file, that should not have been changed

* Removed confirmed flag from db. It was not used.

Handle case where a user is signed up for 2fa, but the provider do not exist anymore. Then it is just ignored until it shows up again

Reintroduced ProviderName on interface, to ensure the class can be renamed safely

* Bugfix

* Registering DeleteTwoFactorLoginsOnMemberDeletedHandler

* Rollback nuget packages added by mistake

* Update src/Umbraco.Infrastructure/Services/Implement/TwoFactorLoginService.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TwoFactorLoginRepository.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Added providername to snippet

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-01-21 13:10:34 +01:00
Bjarke Berg
029a261476 Improve functionality for external member logins (#11855)
* Bugfix - Take ufprt from form data if the request has form content type, otherwise fallback to use the query

* External linking for members

* Changed migration to reuse old table

* removed unnecessary web.config files

* Cleanup

* Extracted class to own file

* Clean up

* Rollback changes to Umbraco.Web.UI.csproj

* Fixed migration for SqlCE

* Change notification handler to be on deleted

* Update src/Umbraco.Infrastructure/Security/MemberUserStore.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Fixed issue with errors not shown on member linking

* fixed issue with errors

* clean up

* Fix issue where external logins could not be used to upgrade Umbraco, because the externalLogin table was expected to look different. (Like after the migration)

* Fixed issue in Ignore legacy column now using result column.

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-01-19 09:21:50 +01:00
Elitsa Marinovska
d8b3a1bbe5 Get rid of some more duplicate code 2021-08-17 13:09:25 +02:00
Zeegaan
f299c6a93b Updated 15 classes to use the new TryGetUmbracoContext and implemented a Set() method in HybridUmbracoContextAccessor 2021-08-11 13:25:17 +02:00
Warren Buckley
b177c1ba12 Further Simplification of IOptions 2021-07-07 13:07:01 +01:00
Warren Buckley
8d936c08da Change RenderController defautl type to be swapped out using the .NETCore options pattern 2021-07-07 12:52:02 +01:00
Elitsa Marinovska
0c3db013d5 Approve member when created with built-in macros (#10428)
* Allow members created with built-in macros to be approved

* Cleanup

* Newly created members are always approved like in v8.

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-06-15 13:51:39 +02:00
Shannon Deminick
a1624d26a3 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>
2021-04-20 07:11:45 +02:00
Shannon
c2d5ab99d7 Adds explicit scopes for single transactions in member controllers 2021-04-13 11:53:42 +10:00
Shannon
8ea88a980a Fixes anti-forgery, fixes tempdata, adds front-end security/identity, gets member macro snippets and controllers all working, removes old code, adds more props to the member identity 2021-04-09 15:24:12 +10:00
Shannon
2d2feb86bb Starts converting member macros 2021-03-26 00:22:11 +11:00
Shannon
6148336d04 Adds new event so we know when umbraco routes a value, ensure the IUmbracoWebsiteSecurity is initialized for front-end requests, cleans up some of the routing middleware, adds lots of notes 2021-03-01 12:51:07 +11:00
Shannon
abb5911b24 WIP fixing issue with macro forms 2021-02-26 16:53:53 +11:00
Mole
5bd8e32279 Align namespaces in Persistence
Made everything except for repository interface be in the Umbraco.Cms.Infrastructure.Persistence namespace
2021-02-12 13:36:50 +01:00
Mole
9dcd4cb74a Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/align-namespaces
# Conflicts:
#	src/Umbraco.Web/Mvc/SurfaceController.cs
2021-02-12 08:40:36 +01:00
Shannon
aeae2fcfd2 Removes old classes that merge viewdata and modelstate that are no longer necessary 2021-02-12 16:10:50 +11:00
Mole
eb03671b52 Align namespaces in Umbraco.Web.Website 2021-02-10 14:30:14 +01:00
Mole
55aa2edb72 Align namespaces in Umbraco.Web.Common 2021-02-10 11:42:04 +01:00
Mole
dd488a15f4 Move extension methods in core project to Umbraco.Extensions 2021-02-09 13:21:17 +01:00
Mole
216fb87c79 Rename Umbraco.Core namespace to Umbraco.Cms.Core 2021-02-09 10:22:42 +01:00
Shannon Deminick
7aff288ff1 Apply suggestions from code review
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2021-02-05 12:32:09 +11:00
Shannon
6273c95a90 Gets UmbracoPageResult working with ViewData and TempData 2021-02-04 14:51:55 +11:00
Shannon
eda98aa41f Changes how controllers are discovered, re-uses aspnetcore to do this, rely directly on the resolved ControllerActionDescriptor since this is how routing works anyways and also saves future lookups (perf), gets the UmbracoPageResult 'working' - at least to proxy a controller execution but now we need to do the model state merging, etc... 2021-02-04 13:09:28 +11:00
Shannon
0c26a82489 Changes the umbraco route values to use http features intead of in route values which is much nicer, fixes the redirect to page result, tests a surface controller POST and it works, ensures the routing takes place before the form check, removes a bunch of old code 2021-02-03 15:47:27 +11:00
Shannon
c024db9d3c gets surface controllers and front-end api controllers auto-routed, adds tests 2021-02-02 14:48:01 +11:00
Shannon
333479666c removes ResponseStatusDescription and others that aren't used, ports the not found handler, ports redirects, headers, etc... 2021-01-06 20:03:49 +11:00
Shannon
63ab8ec52c Lots of notes, removes data tokens, 2020-12-10 18:09:32 +11:00
Shannon
e3be4009c0 Getting front end routing poc going 2020-12-08 16:33:50 +11:00
Bjarke Berg
85c01d9905 Merge remote-tracking branch 'origin/netcore/dev' into netcore/netcore
# Conflicts:
#	src/Umbraco.Configuration/Legacy/GlobalSettings.cs
#	src/Umbraco.Core/Configuration/IGlobalSettings.cs
#	src/Umbraco.Core/Models/ContentBaseExtensions.cs
#	src/Umbraco.Core/Routing/ContentFinderByRedirectUrl.cs
#	src/Umbraco.Core/Routing/DefaultUrlProvider.cs
#	src/Umbraco.Core/Runtime/MainDom.cs
#	src/Umbraco.Core/Services/IRuntimeState.cs
#	src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs
#	src/Umbraco.Infrastructure/RuntimeState.cs
#	src/Umbraco.Tests/Routing/UrlsWithNestedDomains.cs
#	src/Umbraco.Tests/Runtimes/StandaloneTests.cs
#	src/Umbraco.Tests/TestHelpers/TestObjects.cs
#	src/Umbraco.Web.BackOffice/Controllers/LogViewerController.cs
#	src/Umbraco.Web.BackOffice/Controllers/UsersController.cs
#	src/Umbraco.Web.BackOffice/Mapping/ContentMapDefinition.cs
#	src/Umbraco.Web.BackOffice/PropertyEditors/RteEmbedController.cs
#	src/Umbraco.Web.BackOffice/Trees/DictionaryTreeController.cs
#	src/Umbraco.Web.UI.NetCore/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Web.UI.NetCore/umbraco/config/lang/da.xml
#	src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI.NetCore/umbraco/config/lang/en_us.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/cs.xml
#	src/Umbraco.Web.UI/Views/Partials/Grid/Editors/Rte.cshtml
#	src/Umbraco.Web/Controllers/UmbLoginController.cs
#	src/Umbraco.Web/Install/Controllers/InstallController.cs
#	src/Umbraco.Web/PublishedElementExtensions.cs
#	src/Umbraco.Web/Runtime/WebInitialComposer.cs
#	src/Umbraco.Web/UmbracoHelper.cs
#	src/Umbraco.Web/UmbracoInjectedModule.cs
#	src/Umbraco.Web/UrlHelperExtensions.cs
#	src/Umbraco.Web/UrlHelperRenderExtensions.cs
#	src/Umbraco.Web/WebApi/UmbracoApiControllerBase.cs
2020-12-01 11:34:13 +01:00
Shannon
e53ab2e3c1 removes old controller 2020-11-26 17:28:12 +11:00
Shannon
40d75f88f3 Merge remote-tracking branch 'origin/netcore/netcore' into netcore/task/6666-auth-policies
# Conflicts:
#	src/Umbraco.Web.BackOffice/Controllers/AuthenticationController.cs
#	src/Umbraco.Web.Common/Filters/UmbracoMemberAuthorizeFilter.cs
2020-11-24 00:46:38 +11:00
Shannon
7757447244 Migrates UmbracoBackOfficeAuthorizeAttribute to authz policies and adds notes/questions 2020-11-20 15:32:36 +11:00
Andy Butland
c971a2d23d Introduced website security accessor to ensure members aren't shared between sessions. 2020-11-18 17:37:31 +01:00
Andy Butland
d8ef341854 Refactored to async where appropriate.
Added call to new abstraction in member authorize attribute.
2020-11-18 16:52:40 +01:00
Andy Butland
0fbe01cd22 Created new abstraction IUmbracoWebsiteSecurity and migrated controller's using it (replacing MembershipHelper) to Umbraco.Web.Website. 2020-11-18 16:12:42 +01:00
Bjarke Berg
bb1b04be15 Netcore: Cleanup and migrate few classes from Umbraco.Web (#9375)
* Migrated a few classes, and cleaned up by removing some old classs too in the Umbraco.Web Project

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Migrated a few classes, and cleaned up by removing some old classs too in the Umbraco.Web Project

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Moved SurfaceControllerTypeCollection + Builder

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Moved Extension methods

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Removed Wrap methods.. People should use their own TagBuilder

Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-11-12 11:01:19 +01:00
Bjarke Berg
dae6e2b8ee Migrated RenderNoContentController + related (#9309)
* Migrated RenderNoContentController + related

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Fix after MSDI

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

* Update src/Umbraco.Web.UI/Umbraco.Web.UI.csproj

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

* Removing connection string

* Fixed tests after moving endpoint registration

Signed-off-by: Bjarke Berg <mail@bergmania.dk>

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2020-11-03 18:55:55 +01:00
Bjarke Berg
f17c4631d2 Changed Exception to InvalidOperationException
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-19 06:38:57 +02:00
Bjarke Berg
b27732adc8 Migrated RenderMvcController and RenderIndexActionSelectorAttribute
Signed-off-by: Bjarke Berg <mail@bergmania.dk>
2020-10-15 11:42:16 +02:00
Mole
581775e08c Remove public ILogger from PluginController
Having a public ILogger doesn't align with MS ILogger, and the logger is never used
2020-09-21 11:46:29 +02:00
Bjarke Berg
3ea7945f24 Get rid of system web in netcore and netstandard libraries 2020-08-05 08:44:22 +02:00
Bjarke Berg
cd48adc7af AB6455 - Stub'ed WebSecurity, cleanup and fix issue with content root vs web root 2020-05-12 20:28:40 +02:00
Bjarke Berg
d3b15c4a41 AB6455 Fix missing umbracoContextAccessor in ctors 2020-05-12 19:12:57 +02:00
Elitsa Marinovska
0eefbfd449 Migrating SurfaceController 2020-05-11 20:29:38 +02:00