* dont rellay on only resolved based on properties, but also scan the CompositionPropertyTypes to resolve compistion inside the black
* Refactored to helper method.
---------
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix for https://github.com/umbraco/Umbraco-CMS/issues/18872
* Parsing added for current value
* Build fix.
* Cyclomatic complexity fix
* Resolved breaking change.
* Pass content key.
* Simplified collections.
* Added unit tests to verify behaviour.
* Allow file upload on block list.
* Added unit test verifying added property.
* Added unit test verifying removed property.
* Restored null return for null value fixing failing integration tests.
* Logic has been updated according edge cases
* Logic to copy files from block list items has been added.
* Logic to delete files from block list items on content deletion has been added
* Test fix.
* Refactoring.
* WIP: Resolved breaking changes, minor refactoring.
* Consistently return null over empty, resolving failure in integration test.
* Removed unnecessary code nesting.
* Handle distinct paths.
* Handles clean up of files added via file upload in rich text blocks on delete of the content.
* Update src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs
Co-authored-by: Sven Geusens <geusens@gmail.com>
* Fixed build of integration tests project.
* Handled delete of file uploads when deleting a block from an RTE using a file upload property.
* Refactored ensure of property type property populated on rich text values to a common helper extension method.
* Fixed integration tests build.
* Handle create of new file from file upload block in an RTE when the document is copied.
* Fixed failing integration tests.
* Refactored notification handlers relating to file uploads into separate classes.
* Handle nested rich text editor block with file upload when copying content.
* Handle nested rich text editor block with file upload when deleting content.
* Minor refactor.
* Integration test compatibility supressions.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
* Rename/Move/duplicate PaginationService to facilitate conversion closer to the data layer
Duplication is because of internal modifier as we don't want to expose these temporary classes
* Move Guid to Int Extensions into core + add unittests
* Added Document version endpoints
Updated used services to use async methods
* Moved PaginationConverter into core so it can be used by the service layer
* Endpoint structure improvements
* Updating OpenApi.json
* Add greedy constructors for contentService tests
* Namespace changes and naming cleanup
* Update openapispec again...
* Refactor injected services
* PR suggestion updates
- Move endpoints into their own structural section as they are also in a different swagger section
- Naming improvements
- Allign PresentationFactories with similar classes
- Cleanup unused assignments
- Cleanup refactoring comments
- Improve obsoletion remarks
* Cleanup
* ResponseModel improvements
* OpenApi spec update
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Elitsa <elm@umbraco.dk>
* Migrate ObjectJsonExtensions
* Use more generic exception to not use Newtonsoft
It should matter if it's a JsonReaderException, if we can't read we can't read
* Remove obsoleted constructors
* Use more generic exception in ContentValueSetBuilder
* Fix constructors
* Remove UdiRangeJsonConverter
* Remove more legacy newtonsoft stuff
* Migrate away from newtonsoft in CacheInstructionService
* Remove unused model binders
* Remove more newtonsoft
* Remove newtonsoft from DatabaseServerMessenger
* Remove now irrelevant benchmark
* Remove the usage of Newtonsoft from ImageCropperTemplateCoreExtensions
The value converter will never return JObject, JsonDocument, or JsonNode
* Remove usages of newtonsoft in ComplexPropertyEditorContentNotificationHandler
JTokens are no longer returned, so we don't need to check for it
* Remove newtonsoft references
* Re-add newtonsoft dependency to Umbraco.Tests.Common
* Fix package references
* move dependency
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Refactor jobs from HostedServices into BackgroundJobs
* Clean up generics and DI setup
* Add RecurringBackgroundJob Unit Tests
* Add ServiceCollection helper
* Add Obsolete attributes
* Add Notification Classes
* Add UnitTests for RecurringBackgroundJob HostedService
* Add NotificationEvents
* Add state to notifications
* Update UnitTests
* Add Obsolete Attributes to old hosted service classes
* Updated xmldoc in IRecurringBackgroundJob.cs
* Update Obsolete attribute messages to indicate classes will be removed in Umbraco 14
(cherry picked from commit c30ffa9ac3)
* insert umb rte block web component in rte
* First stab at moving the RTE markup to a nested "markup" property in the property value.
* initial work
* only rewrite markup
* transform RTE into component
* parse scope in grid.rte
* revert use a fallback instead
* block insertion and sync in place
* block picker partly impl
* remove test of old controller
* remove test of old controller
* block with block data
* proper block with api connection
* remove log
* styling
* Persist blocks data (still a temporary solution)
* styling allows for interaction
* block actions
* tinyMCE styling
* paste feature
* prevalue display Inline toggle
* inline mode in RTE
* todo note
* fixes wording
* preparation for editor communication
* remove val-server-match for now
* clean up blocks that does not belong in markup
* remove blocks not used in the markup
* liveEditing
* displayAsBlock formatting
* clean up
* TODO note
* Serverside handling for RTE blocks (incl. refactor of Block List and Block Grid)
* ensure rich text loads after block editor
* trigger resize on block init
* Handle RTE blocks output in Delivery API
* sanitize ng classes
* simplify calls to init blocks
* move sanitisation
* make validation work
* only warn when missing one
* clean up
* remove validation border as it does not work
* more clean up
* add unsupported block entry editor
* Revert breaking functionality for Block List and Grid
* prevent re-inits of blocks
* make sure delete blocks triggers an update
* Refactor RichTextPropertyIndexValueFactory to index values from blocks + clean up RichTextPropertyEditor dependencies
* first working cursor solution
* inline element approach
* Handle both inline and block level blocks
* Fix the RTE block parser regex so it handles multiple inline blocks.
* Fix reference and tags tracking, add tests, make the editor backwards compatible and make deploy happy
* Use RichTextPropertyEditorHelper serialization in tests
* Ensure correct model in Block Grid value converter (incl unit test to prove it)
* do not include umbblockpicker in grid
* make blocks the new default, instead of macros
* only send value of body from DOMParser
* Blocks of deleted ElementTypes shows unsupported
* do not edit a unsupported block
* remove trying to be smart on the init
* fix missing culture issue
* set dirty
* alert when no blocks
* Revert "make blocks the new default, instead of macros"
This reverts commit 283e8aa473fdfde075197d34aa47e35dfc64a8ae.
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Use interfaces for API media return values + introduce dedicated models for crops and focal points
* Move content and media controllers to their own namespaces
* Add UserResponseModel
* Add factory to created UserResponseModel
* Add GetByKey controller
* Add GetAllUsers endpoint
* User proper response model
* Make naming consistent
* Order by username in GetAll
* Add user filter endpoint
* Fix includer user states
* Remove gravatar from the backend
* Send user avatars in response
* Add create user model
* start working on create
* Validate the create model
* Add authorization to create
* Use UserRepository instead of UserService to ValidateSessíonId
* Create IBackofficeUserStore interface
This is essentially a core-friendly version of the BackOfficeUserStore, additionally it contains basic methods for managing users, I.E. Get users, save users, create users, etc.
* Remove more usages of user service
* Remove usages of IUserService in BackofficeUserStore
* Add documentation
* Fix tests and DI
* add IBackOfficeUserStoreAccessor to resolve it in singleton services
* Resolve circular dependency
* Remove obsolete constructor
* Add core friendly user manager
* Finish createasync in user service
* Add WIP create endpoint
* Save newly creates users user groups
* Use service scope for user service
* Remove now unnecessary accessors
* Add response types
* Add update user endpoint
* Add EmailUserInviteSender
* Add technology free way of creating confirmation token
* Add invite uri provider
* Add invite user to user service
* Add invite user controller
* Add delete endpoint
* Add operation status responses
* Add operation status responses
* Added temporary file uploads including a repository implementation using local temp folder.
* Add Disable users endpoint
* missing files
* Fixed copy paste error
* Fix create users return type
* Updated OpenApi.json
* Updated OpenApi.json
* Handle if created failed in identity
* Add enable user
* Make users plural in enable/disable
We're doing the operation on multiple entities
* Added file extension check
* Add unlock user endpoint
* Clean up. Removed old TemporaryFileService and UploadFileService and updated dictionary items to use this new items
* Clean up
* Add reset password
* Add UpdateUserGroupsOnUsers method
* Add UpdateUserGroups
* Get rid of stream directly on TemporaryFileModel, and use delegate to open stream instead.
* Fix post merge
* Use keys instead of IDs
* Add ClearAvatar endpoint
* Review changes
* Moved models to their own files
* Reverted launch settings
* Move enlist extension to its own namespace
* Create set avatar endpoint
* Add reponse types
* Remove infrastructure extension after merge
* Add Cmapatibility suppressions
* Add test suppression
* Add integration tests
* Fix issue found in tests
* Add invited user to UserInvitationResult
* Add more tests
* Add update tests
* Hide different tests under parent
* Return DuplicatUserName user operation status if username matches an email
* Add update tests
* Change sorted set to HashSet
It doesn't work if it's not IComparable
* Change ID to Key when checking super
* Add get tests
* Add more GetAllTests
* Move tests to the right namespace
* Add filter test
* Fix including disabled users bug found by test
* Add test to ensure invited user state
* Add test case for UserState.All
* Add more filter tests
* Add enable disable tests
* Add resolver for keys and ids
* Replace usages of IUserService with IUserIdKeyResolver
* Add CompatibilitySuppressions
* Add UserIdKeyResolverTests
* Fix UserIdKeyResolver
* Add missing user operation results
* Updates from review
* ID not key
* Post instead of patch
* Use set instead of params for enable/disable
* Don't call to array
* Use sets for usergroup keys and user keys instead
* LanguageIsoCode instead of Language
* Update CompatibilitySuppressions after changin enumerable to set
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: kjac <kja@umbraco.dk>
* Added temporary file uploads including a repository implementation using local temp folder.
* missing files
* Fixed copy paste error
* Updated OpenApi.json
* Updated OpenApi.json
* Added file extension check
* Clean up. Removed old TemporaryFileService and UploadFileService and updated dictionary items to use this new items
* Clean up
* Get rid of stream directly on TemporaryFileModel, and use delegate to open stream instead.
* Review changes
* Moved models to their own files
* Reverted launch settings
* Update open API JSON file
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Add MSSQL migration
* Make upgrade possible when user doesn't have a key yet
* Migrate SQLite
* Migrate the external login column
* Fix logging in after migration
* Handle fake GUID correctly
* Make GetByKey async
* Resolve external logins by key instead of id
* Remove usage of naive UserIdToInt
* Dont use ToGuid for property type defaults
* Use constant GUID for user groups
* Ensure that the same GUID is used to create the root user.
* Add migration for two factor logins
* Add default implementations
* Fix unit test
* Remove TODO
* Fix integration tests
* Add default implementation instead of throwing
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Make SQLServer migration idempotent
* Add comment about SQLite
* Fix typo
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This is left over from v8's APIs where we would pass in params int[] but in most cases we are just passing in a single value yet we are then allocating arrays everytime. There's no need to allocate these, it's just extra overhead.