Commit Graph

916 Commits

Author SHA1 Message Date
Nhu Dinh
2193ded62d V14 Added acceptance tests for Relation Types (#15653)
* Fixed failing tests

* Updated tests to use the updated helpers

* Clean up tests

* Enabled our pipeline for E2E testing

* Updated the CMS URl for our E2E tests

* Bumped version of our testHelpers

* Did some fixing, still a bit more to do

* Updated auth tests to use LoginUiHelper

* Updated Telemetry tests to use TelemetryUiHelper

* Updated LogViewer tests to use LogViewerUiHelper

* Updated api tests to apply AAA pattern and fix failed tests

* Removed unused import

* Added api tests for RelationType

* Added ui tests for Relation Type

* Bumped test helper version

* Added api tests for Relation Types

* Updated ui tests for Relation types

* Updated method due to the test helper changes

* Bumped version

* Fixed merged

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Relation Types/RelationTypes.spec.ts

Added ;

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Relation Types/RelationTypes.spec.ts

Updated name of method

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

* Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Relation Types/RelationTypes.spec.ts

Updated name of method

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2024-02-01 19:46:49 +01:00
Jacob Overgaard
0a6dd9538a add retry count for flaky test (#15632)
* add retry count for flaky test

* add retry to try and have test pass
2024-02-01 14:28:47 +01:00
Bjarke Berg
9eb36c0234 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Packages.props
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_0_0/AddMemberPropertiesAsColumns.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_2_0/AddHasAccessToAllLanguagesColumn.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_2_0/AddUserGroup2LanguageTable.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_3_0/AddBlockGridPartialViews.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_4_0/AddBlockGridPartialViews.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_5_0/AddPrimaryKeyConstrainToContentVersionCleanupDtos.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_7_0/MigrateTagsFromNVarcharToNText.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_11_3_0/AddDomainSortOrder.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_11_4_0/AlterKeyValueDataType.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/ResetCache.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_0_0/UseNvarcharInsteadOfNText.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_1_0/AddOpenIddict.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/V_12_1_0/TablesIndexesImprovement.cs
#	src/Umbraco.Web.UI.Docs/README.md
#	src/Umbraco.Web.UI.Docs/gulpfile.js
2024-02-01 11:24:43 +01:00
Bjarke Berg
49acf8b35c Merge remote-tracking branch 'origin/release/13.1' into v13/dev
# Conflicts:
#	version.json
2024-02-01 11:18:58 +01:00
Ronald Barendse
25139dabe0 Skip cache refresher operations for content blueprints (#15633)
* Skip cache refresher operations for content blueprints

* Fix JsonPayload deserialization error by adding a default constructor and property initializers

* Obsolete JsonPayload constructor and update usages
2024-02-01 10:29:31 +01:00
Nikolaj Geisle
74db02c444 V14: Don't add published culture infos if not published (#15370)
* Don't add published infos if not published

* Unpublish all cultures as a whole

* Added tests

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-02-01 08:33:14 +01:00
Mole
008083f096 V14: Migration Cleanup (#15629)
* Remove obsoleted migrations

* Re-add default log queries

* Remove unused PreValueMigratorCollectionBuilder from DI

* Remove unused unit test

* Obsolete unused migrations

* Remove migrations prior to v13 from UmbracoPlan

* Fix whitespace

* Use array instead of IEnumerable

* Remove unused migrations
2024-01-31 12:45:56 +01:00
Kenn Jacobsen
aaf7075313 Property level validation for Management API (#15644)
* Property level validation for content - initial implementation

* Always succeed create/update regardless of property level validation errors

* Move old complex editor validation classes to Web.BackOffice so they will be deleted

* Include operation status and property validation errors in ProblemDetails

* Refactor property validation to its own service(s)

* Make the problem details builder a little more generic towards extensions

* Validation for item and branch publish

* Moved malplaced test

* Get rid of a TODO

* Integration tests for content validation service

* Simplify validation service

* Add missing response types to create and update for document and media

* Remove test that no longer applies

* Use "errors" for model validation errors (property validation errors)

* Split create/update and validation into their own endpoints

* Fix forward merge

* Correct wrong assumption for missing properties

* Remove localization from validation error messages - decreases dependencies, adds a lot of obsolete constructors

* Reuse existing validation service + support custom error messages

* Fix merge errors

* Review comments
2024-01-31 10:40:58 +01:00
Kenn Jacobsen
9b454bec6b Model mapping PoC (#15546)
* First take at new models for improved mapping between client and server

* Add variants to Media

* Re-introduced lost names

* Start breaking apart "Id" reference properties in request models as well

* Refactor to fix OpenAPI spec

* Discard TODO (not relevant)

* Split recycle bin response models

* Delete unused marker interface

* Use reference properties for content and media type handling

* Rework document and media types to be explicit in relations (do not expose "content type", it is an implementation detail)

* Mapping for document and media type copy + move

* Ensure correct response model for Media

* Regenerate OpenAPI JSON after forward merge

* Fix forward merge issues

* Fix forward merge + regenerate OpenApi.json

* Added unit tests for content state helper

* Move "allowed document types" endpoint to document type silo, refactored services and added "allowed media types"

* Regenerate OpenApi.json after forward merge

* Do not include content state for media items

* Review fix
2024-01-30 12:19:05 +01:00
Sven Geusens
fd8c31908d Merge branch 'release/13.1.0' into v13/dev
# Conflicts:
#	version.json
2024-01-25 12:40:32 +01:00
Andreas Zerbst
a93980b64c V14 Acceptance Test for the Package Section (#15618)
* In progress tests

* Updated createdPackaged tests

* Added test for checking if we are able to see the marketplace

* Added tests for checking if the correct message is shown

* Made quite a lot of changes, used the locators in the testHelpers. Added additional tests

* Updated to match changes to the Ui TestHelpers

* Fixed test

* added package file

* Bumped versions

* Updated naming

* Fixed Acceptance Test to match patterns

* Updated locator in test.

* Added Act comment

* Followed comments from PR
2024-01-25 16:56:25 +07:00
Bjarke Berg
91119308a2 Merge remote-tracking branch 'origin/v14/dev' into v14/dev 2024-01-24 11:12:45 +01:00
Mole
76181a8af4 V14: Migrate JsonConfigManipulator to System.Text.Json (#15609)
* Minor cleanup

* Remove old obsoleted property

* Reimplement save connection string

* Remove old method using newtonsoft

* Implement RemoveConnectionStringAsync

* Implement SaveConfigValue

* Implement SaveDisableRedirectUrlTracking

* Cleanup

* Implement SetGlobalIdAsync

* Fix recursive default implementation

* Split manipulating dom and saving json

Otherwise SaveConnectionStringAsync would write twice.

* Add some documentation strings

* Reduce indentation

* Obsolete non-async methods

* Move JsonConfigManipulator to correct namespace and make it internal
2024-01-24 11:07:18 +01:00
Bjarke Berg
7a6b316f4b Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyValueEditor.cs
#	src/Umbraco.Infrastructure/PropertyEditors/NestedContentPropertyEditor.cs
#	src/Umbraco.Web.BackOffice/Security/BackOfficeSignInManager.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/DataValueEditorReuseTests.cs
#	version.json
2024-01-24 08:36:55 +01:00
Bjarke Berg
aaca7a5ff4 2FA for users in management API (#15607)
* Added 2FA management endpoints

* Ensure not found do not lead to forbidden results

* Do not inherit the requirement to have access to users, from the current user base class

* Updated OpenApi.json

* Handle 2FA in login scenario (only backend)

* Added the endpoint to use for client to post 2FA code

* Fixed tests and allow injecting the authentication type settings

* fix test build

* Fallback to use Constants.Security.BackOfficeAuthenticationType

* remove unused variable

* Review fixes

* Build fix

* Update src/Umbraco.Cms.Api.Management/Controllers/User/Current/DisableTwoFactorProviderCurrentUserController.cs

Co-authored-by: Sven Geusens <geusens@gmail.com>

* Handle case where 2fa provider is already setup

---------

Co-authored-by: Sven Geusens <geusens@gmail.com>
2024-01-23 18:07:21 +01:00
Bjarke Berg
088f907dcc Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs
#	src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyValueEditor.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/DataValueEditorReuseTests.cs
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionTests.cs
2024-01-23 13:40:07 +01:00
Nhu Dinh
8bf8483dcb V14 QA Added acceptance tests for Dictionary (#15479)
* Bumped version of TestHelper

* Added .udt test files

* Updated api tests for Dictionary

* Added ui tests for Dictionary

* Updated ui tets for Dictionary as TestHelper is changed

* Updated ui tests of Dictionary

* Updated verify step

* Fixed comments

* Imported crypto into Dictionary.spec.ts

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

* Fixed format

---------

Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2024-01-23 09:47:23 +01:00
Sven Geusens
26761cc04a Implemented culture based authorization for content (#15580)
* Implemented culture based authorization for content

* Implemented culture auth for create/update of documents

* Applied culture authorization to dictionary create/update

* Added an integration test to test an assumption about the ContentTypeEditingService.CreateAsync method

* Fix processing when result is already false;

* Apply suggestions from code review

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Refactor method to async + clarify and consilidate comments regarding dictionary locks

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2024-01-22 21:08:20 +01:00
Sven Geusens
acc71b6d45 Add management api delete document endpoints (#15600)
* Added Delete document endpoint

* Added delete from recylebin endpoint

Added/restructured unittests

* Clarifications

* Moved document specific mapping from base recyclebin to document recyclebin

* Refactor OperationStatusResult mapping trough inheritance

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2024-01-22 15:58:18 +01:00
Bjarke Berg
5940a54585 Updated minor and patch dependencies. (#15619) 2024-01-22 15:40:26 +01:00
Ronald Barendse
ce22315520 Backport relation tracking fixes and get references from recursive (nested/block) properties (#15593)
* Include automatic relation type aliases from factory and fix SQL parameter overflow (#15141)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations (#15160)

* Include automatic relation type aliases from factory

* Remove unnessecary distinct and fix SQL parameter overflow issue

* Fixed assertions and test distinct aliases

* Simplified collection assertions

* Improve logging of invalid reference relations

* Always get all automatic relation type aliases

* Do not set relation type alias for unknown entity types

* Get references from recursive (nested/block) properties

(cherry picked from commit 5198e7c52d)
2024-01-19 20:06:41 +01:00
Elitsa Marinovska
547da0b191 V14: Composition endpoints for Document and Media types (#15584)
* Adding response/request models

* Adding mapping

* Adding factory

* Adding controllers

* Moved to correct (generic domain) namespace

* Renamed to reflect the correct domain + renamed IsAllowed to IsCompatible

* Renaming + TODO

* Removed presentation logic + TODO

* Fixed controller

* Attempt for generic implementation

* Enable composition of media types + refactor content/media type editing tests to prove it (and a little renaming of a mis-named property)

* Remove unused classes

* Introducing GetAvailableCompositionsAsync to EditingServices

* Implement GetAvailableCompositionsAsync

* Base share implementation

* Tests

* Tests

* Renaming

* Clean up controller

* Clean up test

* Remove redundant check

* Create and use generic models

* Add shared implementation

* Fix and rename doc type mapper

* Fix document Type factory

* Add missing response type

* Create a base request model

* Make key nullable when new item

* Media type response models

* Default isElement to false and remove isElement param from media type related things

* Create mappings for media type compositions

* Inject generic base service to reuse implementation amongst concrete services

* Add new composition endpoints for media type

* Use specific type

* Add a reference comment to other test suite

* Add more test cases

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-01-17 08:36:27 +01:00
Bjarke Berg
aa6f704353 Merge remote-tracking branch 'origin/v14/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Infrastructure/BackgroundJobs/Jobs/OpenIddictCleanupJob.cs
2024-01-12 13:34:30 +01:00
Nhu Dinh
664da17c39 V14 QA Fixed the failed acceptance tests (#15527)
* Fixed failing tests

* Updated tests to use the updated helpers

* Clean up tests

* Enabled our pipeline for E2E testing

* Updated the CMS URl for our E2E tests

* Bumped version of our testHelpers

* Did some fixing, still a bit more to do

* Updated auth tests to use LoginUiHelper

* Updated Telemetry tests to use TelemetryUiHelper

* Updated LogViewer tests to use LogViewerUiHelper

* Updated api tests to apply AAA pattern and fix failed tests

* Removed unused import

* Fixed comments

* Bumped version of test helper

* Updated the version to 10 instead of 11

* Updated the package-lock.json file to contain the correct versions

* Added a waitForTimeout
The reason for this is that this test is failing on the pipeline

* Bumped version of testhelpers

* Removed TODO

* Updated EnsurePathExists so we create the stylesheet and scripts folder

* Added a waits for response, otherwise our test would be too fast

* Sometimes it reloads before the save is complete

* Added timeout for locator

* Removed duplicate

* Wait until save

* This was an actual bug, so we should not use a workaround, we should fix it

* Skips the tests for script.

* Bug was fixed, so this can be used again

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2024-01-12 13:32:25 +01:00
Ronald Barendse
05921ee6cc Refactor System.Runtime.Caching to Microsoft.Extensions.Caching.Memory 2024-01-11 14:26:19 +01:00
Ronald Barendse
ace5c54da2 Remove unused/untested dependent files support from IAppPolicyCache 2024-01-11 14:25:54 +01:00
Bjarke Berg
e291fae01e Migrated ReportSite, OpenIddictCleanup and TemporaryFileCleanup to background jobs (#15555)
* Migrated ReportSite, OpenIddictCleanup and TemporaryFileCleanup to the new background jobs introduced in v13.

* Fixed delay and period
2024-01-11 13:18:10 +01:00
Mole
416c19854d V14: Migrate examine integration tests to V14 (#15536)
* Begin migrating test to use new service calls

* Fix formatting

* Add todo to add timeout so our tests dont stall entirely

* Add timeout so tests can run

Still need to figure out why the index only seems to update sometimes

* Migrate BackOfficeExamineSearcherTests to use new service calls

* Remove unused imports

* Migrate to languageservice in external index searcher test

* Use seperate save and publish calls

* Use scopes in ExamineExternalIndexTests

* Use scopes in BackOfficeExamineSearcherTests
2024-01-11 11:12:47 +01:00
Bjarke Berg
d3dc85f31f Only update security stamp once per request (#15562)
* Add item in requestcache when security stamp is already updated in request

* Propagate constructur obsoletion to implementing services and fix unit tests

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-01-11 10:20:58 +01:00
Bjarke Berg
5f4c8ea0bf Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
2024-01-10 08:36:50 +01:00
Nikolaj Geisle
3acda751b9 v14: Add Preview controller (#15481)
* Add Preview controller

* Implement PreviewService

* Add tests for endpoints.

* Add Authorization to previews

* Apply suggestions from code review

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

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2024-01-09 15:51:59 +01:00
dependabot[bot]
e8eec901d1 Bump follow-redirects in /tests/Umbraco.Tests.AcceptanceTest
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-09 10:57:13 +01:00
Sebastiaan Janssen
6258fa6a35 Merge branch 'v13/dev' into contrib
# Conflicts:
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
2024-01-02 10:33:35 +01:00
Nikolaj Geisle
674c48ab9a V14: Add optional key to template create model (#15471)
* Implement Id for request model

* Make key optional

* Add test for use case

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-01-02 08:57:07 +01:00
Bjarke Berg
1e849ad539 Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Build.props
#	src/Umbraco.Web.BackOffice/Controllers/ContentController.cs
2023-12-22 14:19:04 +01:00
Nikolaj Geisle
fc71724386 V14: Server information (#15497)
* Rename information endpoint to troubleshooting

* Rename information endpoint to troubleshooting

* Add new information endpoint

* Fix bad merge

* Add InformationServerController.cs back

* Update serverTime offset to non hard-coded value.

* Add dictionary to swagger models

* Update OpenApi.json file

* Rename map definition

* Add ServerConfigurationBaseModel

* Implement ServerConfigurationBaseModel.cs

* Updated OpenApi

* Updated endpoint to return correct type in openapi

* Use explicit class for server information

* Remove version endpoint, as that is contained in server information.

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2023-12-22 10:21:11 +01:00
Ronald Barendse
f705479767 Ensure artifact dependency keeps correct mode, ordering and checksum values (#15500) 2023-12-21 14:55:43 +01:00
Bjarke Berg
4b3131fda4 Merge remote-tracking branch 'origin/v13/dev' into v14/dev 2023-12-20 15:17:37 +01:00
Bjarke Berg
0b811d6648 Reenabled package validation and fixed breaking change in test 2023-12-20 13:36:01 +01:00
Bjarke Berg
bf498b411c RebuildOnStartupHandler should not inject ExamineIndexRebuilder, but only the interface (#15465) 2023-12-18 06:58:12 +01:00
Bjarke Berg
d1b53c0ec9 Added ignore on new tests (Temporarily) 2023-12-13 16:34:17 +01:00
Bjarke Berg
f8dda5a7b5 Post merge fixes 2023-12-13 16:25:28 +01:00
Bjarke Berg
95094361cc Merge remote-tracking branch 'origin/v13/dev' into v14/dev
# Conflicts:
#	Directory.Packages.props
#	build/azure-pipelines.yml
#	src/Umbraco.Cms.Api.Delivery/Handlers/InitializeMemberApplicationNotificationHandler.cs
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoLogin/Index.cshtml
#	src/Umbraco.Core/DependencyInjection/UmbracoBuilder.CollectionBuilders.cs
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/BlockListPropertyEditorBase.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs
#	src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueCreator.cs
#	tests/Directory.Packages.props
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockListEditor/blockListEditorDataType.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/HelpPanel/helpLinks.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/BlockListPropertyValueConverterTests.cs
#	version.json
2023-12-13 15:34:22 +01:00
Bjarke Berg
8a9e6ee82d Merge remote-tracking branch 'origin/v12/dev' into v13/dev
# Conflicts:
#	global.json
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoRichTextBlock.html
#	src/Umbraco.Core/EmbeddedResources/Lang/da.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/fr.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/tr.xml
#	src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
#	src/Umbraco.Infrastructure/BackgroundJobs/Jobs/HealthCheckNotifierJob.cs
#	src/Umbraco.Infrastructure/BackgroundJobs/RecurringBackgroundJobHostedServiceRunner.cs
#	src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
#	src/Umbraco.Web.UI.Client/src/views/components/application/umb-login.html
#	src/Umbraco.Web.UI/Startup.cs
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/BackgroundJobs/Jobs/HealthCheckNotifierJobTests.cs
#	version.json
2023-12-13 09:55:34 +01:00
Elitsa Marinovska
fda866fc9e V14: Add authorization policies to Management API controllers - p2 (#15211)
* Making ProblemDetails details more generic

* Adding authorizer that can be replaces for external authz in handlers. Adding handler and requirement for UserBelongsToUserGroupInRequest policy

* Adding method to get the GUID from claims

* Adding service methods to check user group authz

* Porting MustSatisfyRequirementAuthorizationHandler

* Adding controllers authz

* Fix return status code + produced response type

* Moving to folder

* Adding DenyLocalLogin policy scaffold

* Implement a temp DenyLocalLoginHandler

* Introducing a new Fobidden result

* Fix comment

* Introducing a helper class for authorizers

* Changed nullability for GetCurrentUser

* Changes from Attempt to Status + FIXME comments

* Create a UserGroupAuthorizationStatus to be used in the future

* Introduces a new authz status for checking media acess

* Introducing a new permission service for media

* Adding fixme

* Adding more policy configurations

* Adding Media policy requirement and handler

* Adding media authorizer

* Fix order of params

* Adding duplicate code comment

* Adding authz to media controllers

* Migrating more logic from MediaPermissions.cs

* Adding more MediaAuthorizationStatus-es

* Handling of new authorization status

* Fix comment

* Adding NotFound case

* Adding NewDenyLocalLoginIfConfigured policy && commenting [AllowAnonymous] where the policy is applied since it is already handled

* Changed Forbid() to Forbidden() to get the correct status code

* Remove policy that is applied on the base controller already

* Implement and apply NewUmbracoFeatureEnabled policy

* Renaming classes to add Permission in the name

* Register permission services

* Add FIXME

* Introduce new IUserGroupPermissionService and refactor accordingly

* Add single overload with default implementation

* Adding user permission policy and related

* Applying admin policy

* Register all new policies

* Better wording

* Add default implementation for a single overload

* Adding remarks to IContentPermissionService.cs

* Supporting null as key in ContentPermissionService

* Fix namespace

* Reverting back to not supporting null as content key, but having dedicated implementation

* Adding content authorizer with null values to represent root item

* Removing null key support and adding dedicated implementation

* Removing remarks

* Adding content resource with null support

* Removing null support

* Adding requirement and status

* Adding content authorizer + handlers

* Applying policies to content controllers

* Update comment

* Handling of Authorization Statuses

* More authz in controllers

* Fix comments

* New branch handler

* Obsolete old implementation

* Adding dedicated policies to root and bin

* Adding a branch specific namespace

* Bin specific requirement and namespace

* Root specific requirement and namespace

* Changing to new root policy

* Refactoring

* Save policies

* Fix null check/reference

* Add TODO comment

* Create media root- and bin-specific policies, handlers, etc.

* Apply correct policy in create and update media controllers

* Apply root policy to move and sort controllers

* Fix wording

* Adding UserGroupAuthorizationStatusResult

* Remove all AuthorizationStatusResult as we cannot get the specific AuthorizationStatus

* Fixing Umbraco feature policy

* Fix allow anonymous endpoints - the value returned from DenyLocalLoginHandler wasn't enough, we need to succeed DenyAnonymousAuthorizationRequirement as it is required for some of the endpoints that had the attribute

* Apply DenyLocalLoginIfConfigured policy to corresponding re-implementation of PostSetInvitedUserPassword

* Fix comment

* Renaming performingUser to user and fixing comments

* Rename helper method

* Fix references

* Re-add merge conflict deletion

* Adding Backoffice requirement and relevant

* Registering

* Added a simple policy test

* Fixed small test things and clean up

* Temp solution

* Added one more test and fix another static issue

* Fix another merge conflict

* Remove BackOfficePermissionRequirement and handler as they might not be necessary

* Comment out again [AllowAnonymous]

* Remove AuthorizationPolicies.BackOfficeAccessWithoutApproval policy as it might not be necessary

* Fix temp implementation

* Fix reference to correct handler

* Apply authz policy to new publish/unpublish controllers

* Fix comments

* Removing duplicate ProducesResponseTypes

* Added swagger documentation about the 401 and 403

* Added Resources to Media, User and UserGroup

* Handle root, recycle bin and branch in the same handler

* Handle both parent and target when moving

* Check Ids for all sort requests

* Xml docs

* Clean up

* Clean up

* Fix build

* Cleanup

* Remove TODO

* Added missing overload

* Use yield

* Adding some keys to check

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
2023-12-11 08:25:29 +01:00
Sebastiaan Janssen
6f582451ed Merge branch 'release/13.0' into v13/dev
# Conflicts:
#	version.json
2023-12-08 15:54:06 +01:00
Andreas Zerbst
258ab59286 Updated the keys for adding a block list 2023-12-08 15:00:47 +01:00
Ronald Barendse
9e96bba9bc Disable transitive package version pinning (#15406)
* Disable transitive package version pinning

* Take top-level dependencies on Azure.Identity and System.Net.Http

* Take top-level dependencies on System.Security.Cryptography.Xml and System.Text.RegularExpressions
2023-12-08 15:00:18 +01:00
Bjarke Berg
cf2ec50d15 Merge remote-tracking branch 'origin/release/12.3.4' into v12/dev
# Conflicts:
#	version.json
2023-12-08 13:34:41 +01:00
Sebastiaan Janssen
024a57e098 Merge branch 'v12/dev' into v13/dev
# Conflicts:
#	global.json
#	src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Default.cshtml
#	src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoRichTextBlock.html
#	src/Umbraco.Core/EmbeddedResources/Lang/da.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/tr.xml
#	src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs
#	src/Umbraco.Infrastructure/BackgroundJobs/Jobs/HealthCheckNotifierJob.cs
#	src/Umbraco.Infrastructure/BackgroundJobs/RecurringBackgroundJobHostedServiceRunner.cs
#	src/Umbraco.Web.Common/DependencyInjection/UmbracoBuilderExtensions.cs
#	src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js
#	src/Umbraco.Web.UI.Client/src/common/services/editor.service.js
#	src/Umbraco.Web.UI/Startup.cs
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/BackgroundJobs/Jobs/HealthCheckNotifierJobTests.cs

(cherry picked from commit ef3f2c48198d8baed9d3340f926cd07e80720428)
2023-12-06 12:47:51 +01:00