* Content picker search with start node configured not taking user start nodes into account (#19800)
* Fix users being able to see nodes they don't have access to when using the picker search
* Readability and naming improvements
* Additional fixes
* Adjust tests
* Additional fixes
* Small improvement
* Replaced the root ids with constants
* Update src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
# Conflicts:
# src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs
# src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs
# src/Umbraco.Web.BackOffice/Trees/MediaTreeController.cs
# src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
# tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/BackOfficeExamineSearcherTests.cs
* Add new constructor without unused and obsolete parameters
* Use non obsolete constructor in tests
* Add `dataTypeId` as parameter in document and media search endpoints to get `ignoreUserStartNodes` value
* Update backend API generated typed client
* Updated picker search to pass in data type unique
* Move data type retrieval to UmbPickerContext
* Adjust the controller constructors to make it non breaking
* Adjust controller methods to make non-breaking.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* add option to interface
* pass config to picker
* add option to interface
* force type
* add request args to type
* pass allowed content types as request args
* add comments
* allow for passing type
* more type safety
* use correct types
* use correct types
* add js docs
* remove debugger + map to only pass id to server
* add js docs
* align naming
* add null check
* align types
* implement allowedContentTypes for member search
* fix imports
* add types for media search
* add and use const
* align picker interfaces
* align models
* add entity type
* filter for null value
* explicit naming
* rename field
* use query params
* Implement content type scoped search in item search controllers
* Fix bad naming
* generate server models
* wire up backend
* generate server models
* add selectable filter to member picker
* Update member-picker-modal.element.ts
* Fix indexed search for specific member and media types
* export consts
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Start removing scope references
* Update src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Make test-only ctor internal
* Fix tests
* Dont treat warnings as errors
* Disable package validation, as this is a major
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added new notification to hook in after the premigrations and use this to init different services.
* Force MaxDegreeOfParallelism to 1, while investigating scopes
* Tried some more workarounds
* Updated scopes and changed parallel to non parallel to ensure migration works
* Missing scope
* Make it parallel again - The secret is, the SuppressFlow needs to be when you create the task, but not on the await!.
* Fixed issue when DEBUG_SCOPES is not added to tests.
* Remove test exception
* Try build on ubuntu again, even that we know it can be stuck. Just a test to see if all tests pass
* Updated comment
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Remove nucache reference from Web.Common
* Get tests building-ish
* Move ReservedFieldNamesService to the right project
* Remove IPublishedSnapshotStatus
* Added functionality to the INavigationQueryService to get root keys
* Fixed issue with navigation
* Remove IPublishedSnapshot from UmbracoContext
* Begin removing usage of IPublishedSnapshot from PublishedContentExtensions
* Fix PublishedContentExtensions.cs
* Don't use snapshots in delivery media api
* Use IPublishedMediaCache in QueryMediaApiController
* Remove more usages of IPublishedSnapshotAccessor
* Comment out tests
* Remove more usages of PublishedSnapshotAccessor
* Remove PublishedSnapshot from property
* Fixed test build
* Fix errors
* Fix some tests
* Delete NuCache 🎉
* Implement DatabaseCacheRebuilder
* Remove usage of IPublishedSnapshotService
* Remove IPublishedSnapshotService
* Remove TestPublishedSnapshotAccessor and make tests build
* Don't test Snapshot cachelevel
It's no longer supported
* Fix BlockEditorConverter
Element != Element document type
* Remember to set cachemanager
* Fix RichTextParserTests
* Implement TryGetLevel on INavigationQueryService
* Fake level and obsolete it in PublishedContent
* Remove ChildrenForAllCultures
* Hack Path property on PublishedContent
* Remove usages of IPublishedSnapshot in tests
* More ConvertersTests
* Add hybrid cache to integration tests
We can actually do this now because we no longer save files on disk
* Rename IPublishedSnapshotRebuilder to ICacheRebuilder
* Comment out tests
* V15: Replacing the usages of Parent (navigation data) from IPublishedContent (#17125)
* Fix .Parent references in PublishedContentExtensions
* Add missing methods to FriendlyPublishedContentExtensions (ones that you were able to call on the content directly as they now require extra params)
* Fix references from the extension methods
* Fix dependencies in tests
* Replace IPublishedSnapshotAccessor with the content cache in tests
* Resolving more .Parent references
* Fix unit tests
* Obsolete and use extension methods
* Remove private method and use extension instead
* Moving code around
* Fix tests
* Fix more references
* Cleanup
* Fix more usages
* Resolve merge conflict
* Fix tests
* Cleanup
* Fix more tests
* Fixed unit tests
* Cleanup
* Replace last usages
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Remove usage of IPublishedSnapshotAccessor from IRequestItemProvider
* Post merge fixup
* Remo IPublishedSnapshot
* Add HasAny to IDocumentUrlService
* Fix TextBuilder
* Fix modelsbuilder tests
* Use explicit types
* Implement GetByContentType
* Support element types in PublishedContentTypeCache
* Run enlistments before publishing notifications
* Fix elements cache refreshing
* Implement GetByUdi
* Implement GetAtRoot
* Implement GetByRoute
* Reimplement GetRouteById
* Fix blocks unit tests
* Initialize domain cache on boot
* Only return routes with domains on non default lanauges
* V15: Replacing the usages of `Children` (navigation data) from `IPublishedContent` (#17159)
* Update params in PublishedContentExtensions to the general interfaces for the published cache and navigation service, so that we can use the extension methods on both documents and media
* Introduce GetParent() which uses the right services
* Fix obsolete message on .Parent
* Obsolete .Children
* Fix usages of Children for ApiMediaQueryService
* Fix usage in internal
* Fix usages in views
* Fix indentation
* Fix issue with delete language
* Update nuget pacakges
* Clear elements cache when content is deleted
instead of trying to update it
* Reset publishedModelFactory
* Fixed publishing
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
* Started work on service
* temp work
* temp commit
* Temp commit
* Added more routing logic
* Fixed tests
* Refactor and prepare for isdraft
* Work on drafts
* Fixed tests
* Move to enlistment to ensure caches is only updated on scope complete
* Clean up and handle null cultures
* Added functionality to the INavigationQueryService to get root keys
* Added migration
* Fixed issue with navigation
* Added migration
* Temp commit, move to cache refreshers.
* Fixed issues
* List urls
* fix build
* Fixed integration tests
* Refactor to create new content finder instead of changing the old
* rollback wrong commited line
* Clean up, and use docuemnt url service for index
* Fixed List endpoin
* Do not use Navigation service in methods intended by management api
* Fixed examine tests
* Make methods virtual
* Use domain from published request
* Use hybrid cache from new content finder
* Eliminate nucache usage
* Fixed issue with delivery api and url generation
* Fixed linux tests
* Added hybrid cache to all integration tests
* Update to dotnet 9 and update nuget packages
* Update umbraco code version
* Update Directory.Build.props
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
* Include preview version in pipeline
* update template projects
* update global json with specific version
* Update version.json to v15
* Rename TrimStart and TrimEnd to string specific
* Rename to Exact
* Update global.json
Co-authored-by: Ronald Barendse <ronald@barend.se>
* Remove includePreviewVersion
* Rename to trim exact
---------
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
* Implement using keymap for member
* Remove current usages of GetUserById
* User userId resolver to resolve user key
* Refactor user repository to use GUID not int
* Add happy path test
* Remove user in cache when user gets updated
* Use await in async method
* Fix up according to review
* Update IMetricsConsentService.cs to have async method
* Fix according to review
* Fix more according to comments
* Revert "Fix up according to review"
This reverts commit a75acaaa
* Get current backoffice user from method
* Update user repository delete functionality
* Fix up more test
* Try to get user by id if key fails
* Add user key as required claim
* Fix tests
* Don't set claim in BackofficeController
* Create constant for the Sub claim
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Obsoletions related to Delivery API
* Fix TypeLoader and TypeFinder tests
* Remove obsolete and default implementations of IFileSource and IFileTypeCollection
* More Delivery API related obsoletions
* VariationContextAccessor related
* ValueFactories obsoletion and fix references
* ValueSetBuilders obsoletions
* ValueConverters obsoletions
* Other obsolete ctors and methods
* Forgotten VariationContextAccessor obsoletion
* More obsoletions
* XPath related obsoletions
* Revert XmlHelper changes
* Delete RenamedRootNavigator and its tests
* Fix test
* XmlHelper obsoletion
* Return null instead of GetXPathValue
* Obsolete entire class instead
* Remove XPath obsoletions from IPublishedCache
* Remove XPath-related if-block that is no longer needed
* Change obsolete msg for classes needed for NuCache
* Moving classes to NuCache and making them internal
* Remove more XPath-related obsoletions
* Remove NavigableNavigator and its tests
* Cleanup
* Remove Xpath references from tests
* Revert interface deletion in MediaCache
* Using XOR operation
Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
---------
Co-authored-by: Nuklon <Nuklon@users.noreply.github.com>
* 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>
* Fixes#15136: Search includes fields from other cultures
Regex was updated to support block list fields
Unpublished nodes on the supplied culture are not filtered out
* Making the code non-breaking
* Fixed failing publish content query integration tests
The tests were not setting the content as publish in the specifed culture
causing the content items to be ignored
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* 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>
* 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
* Add configuration/code to not run certain tests based on variables/release builds
* Applied longrunning testAttribute to the worst offenders (>200ms on my machine)
* Fix yaml notation
* split up windows/non windows test runs
* Added supression for moved tests
* Fix yaml validation issues
* Change yaml string parameter null value to empty string
* Convert empty strings to whitespace strings
* Rename and cleanup some paramater to better reflect why we use them
* Nightly build test
* Change nightly build authentication type
* template paramater fix
* Update nightly pipeline name
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* Implement available culture in Interface and base classes
* Add available cultures
* DI localizationService and use it
* Make the new method have default implementation to avoid breaking change
* Create implementations for old method
* Pass available cultures
* Pass localization service
* Create new method that takes available cultures
* Add ILocalizationService to DI
* implement missing method
* Add database for schema test
* Fixed issue with indexes not added correctly to nested types..
---------
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Implement available culture in Interface and base classes
* Add available cultures
* DI localizationService and use it
* Make the new method have default implementation to avoid breaking change
* Create implementations for old method
* Pass available cultures
* Pass localization service
* Create new method that takes available cultures
* Add ILocalizationService to DI
* implement missing method
* Add database for schema test
* Fixed issue with indexes not added correctly to nested types..
---------
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Updating to Examine 3 beta. Currently not building due to missing support for updating values in the OnTransformingIndexValues event
* Updated to beta 6 - It builds, but we need to fix tests
* Fixed issue with values being passed into nested lists.
* Fixed issue in test
* Updated to examine beta.9
* Fixed breaking changes
Ensure ConfigureWebServer called before ConfigureServices for tests that
make use of WebApplicationFactory.
Still not apparent why tests would pass if debugger isn't attached?
* Added failing test to demonstrate issue with large raw_ fields.
* Switched to StoredField to avoid indexing error for immense fields.
StringField indexes all the content as a single token and has a max
length of 32766.
StoredField does not analyze/index the field but enables retrieval with
luceneSearcher.Doc(docId)
Closes GH #11487