* Persist and expose Umbraco system dates as UTC (#19705)
* Updated persistence DTOs defining default dates to use UTC.
* Remove ForceToUtc = false from all persistence DTO attributes (default when not specified is true).
* Removed use of SpecifyKind setting dates to local.
* Removed unnecessary Utc suffixes on properties.
* Persist current date time with UtcNow.
* Removed further necessary Utc suffixes and fixed failing unit tests.
* Added migration for SQL server to update database date default constraints.
* Added comment justifying not providing a migration for SQLite default date constraints.
* Ensure UTC for datetimes created from persistence DTOs.
* Ensure UTC when creating dates for published content rendering in Razor and outputting in delivery API.
* Fixed migration SQL syntax.
* Introduced AuditItemFactory for creating entries for the backoffice document history, so we can control the UTC setting on the retrieved persisted dates.
* Ensured UTC dates are retrieved for document versions.
* Ensured UTC is returned for backoffice display of last edited and published for variant content.
* Fixed SQLite syntax for default current datetime.
* Apply suggestions from code review
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Further updates from code review.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Migrate system dates from local server time to UTC (#19798)
* Add settings for the migration.
* Add migration and implement for SQL server.
* Implement for SQLite.
* Fixes from testing with SQL Server.
* Fixes from testing with SQLite.
* Code tidy.
* Cleaned up usings.
* Removed audit log date from conversion.
* Removed webhook log date from conversion.
* Updated update date initialization on saving dictionary items.
* Updated filter on log queries.
* Use timezone ID instead of system name to work cross-culture.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* It builds..
* Added granular permissions
* Added granular permissions
* Rename content to document
* Added migration
* Fixed issues causing the migration from v13 was not possible.
* Merged Permissions and Granular Permissions in viewmodel
* Prepared the viewmodel to a future where permissions can be more types.
* OpenApi
* Allow to translate a single char to many strings
* Use frontend friendly values for known permissions
* Validate the documents exist
* Allow setting non-document settings
* Add "$type" when required
* Rename to presentation model and update OpenApi.json
* OpenApi.json
* Fix tests
* OpenAPI
* Fixed issues with upgrades
* Add the discriminator name
* Fixed issues that only happended on SqlServer
* Fixed queries for SqlServer
* Clean up
* More cleanup
* Fix issue when migrating sqlserver
* Split fallback permissions into own concept in view model
* Also split on current user
* Added a extenable pattern for mappers between DTO => Granular Permission => ViewModel and ViewModel => Granular Permission
* Fixed issue with new exists method, that did not take duplicate keys into account.
* Added sections to current user response model
* Formatting fixes
* Move class to its own file
* xml comment
---------
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
* Replace all IsContainer mentions with new ListView property
* Map the list view when creating and updating
* Implement list view migration
* Refactor listview to collection
* Do not assign listview if IsContainer is false
* Fix up HasContainerInPath query
* Update OpenApi.json
* fix up according to review
* Refactor duplicate code to use extension method instead
* Dont make new guid, check for null
* Make extension internal
* Fix up after merge
* Use ReferenceById static method instead of extension
* Fix IWebhook and IEntity GetUdi extension method
* Refactor to use switch expressions
* Add GetUdiForWebhook test
* Added a webhook builder for unit tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add GetAsync method
* Fix up delete document type controller
* Add scope to delete async
* Add some scaffolding
* Add create model
* Start working on validation
* Move validation to its own service
* Use GetAllAsync instead of GetAsync
* Add initial composition support
Still need to figure out some kinks
* Validate compositions when creating
* Add initial folder support
* Initial handling of generic properties
* Add operation status responses
* Move create operation into service
* Add first test
* Fix issued shown by test
* Ensure a specific key can be specified when creating
* Rename container id to container key
Let's try and be consistent
* Create basic composition test
* Ensure new property groups are created with the correct key
* Add test showing property type issue
* Fix property types not using the expected key.
* Validate against model fetched from content type service
Just to make sure nothing explodes on the round trip
* Make helper for creating create models
* Add helper for creating container
* Make helper methods simpler to use
* Add test for compositions using compositions
* Add more composition tests
* Fix bug allowing element types to be composed by non element types
* Remove validators
This can just be a part of the editing service
* Minor cleanup
* Ensure that multiple levels of inheritance is possible
* Ensure doctype cannot be used as both composition and inheritance on the same doctype
* Ensure no duplicate aliases from composition and that compositions exists
* Minor cleanup
* Address todos
* Add SaveAsync method
* Renamed some models
* Rename from DocumentType to ContentType
* Clarify ParentKey as being container only + untangle things a tiny bit
* Clean out another TODO (less duplicate code) + more tests
* Refactor for reuse across different content types + add media type editing service + unit tests
* Refactor in preparation for update handling
* More tests + fixed bugs found while testing
* Simplify things a bit
* Content type update + a lot of unit tests + some refactor + fix bugs found while testing
* Begin building presentation factories for mapping view models to editing models
* Use async save
* Mapping factories and some clean-up
* Rename Key to Id (ParentKey to ParentId)
* Fix slight typo
* Use editing service in document type controllers and introduce media type controllers
* Validate containers and align container aliases with the current backoffice
* Remove ParentId from response
* Fix scope handling in DeleteAsync
* Refactor ContentTypeSort
* A little renaming for clarity + safeguard against changes to inheritance
* Persist allowed content types
* Fix bad merge + update controller response annotations
* Update OpenAPI JSON
* Update src/Umbraco.Cms.Api.Management/Controllers/DocumentType/DocumentTypeControllerBase.cs
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
* Fix review comments
* Update usage of MapCreateAsync to ValidateAndMapForCreationAsync
---------
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
* Add new columns to the member table
* Add missing IsApproved column
* Add joins with nested query
* Add query for selecting new column values from existing members
* Update the member data from the same query
* Make escapes work for sqlite
* Use GetFieldNameForUpdate instead of GetFieldName
* Left join on memberDto
* Remove the now unused property types and data
* Don't create member columns as properties anymore
* Store old properties in fields on member
Also switch the dates to nullable since they can be null
* Map columns when mapping from DTO to Member object
* Display columns in the member content app
* Fix null exception when creating new user
* Hide value if user doesn't have access to sensitive data
* Remove hardcoded member properties
* Obsolete old member alias constants
* Map and persist member properties
* Correctly update LastLogin when member logs in
* Map IsApproved and IsLockedOut when saving member in backoffice
* Update the query mappers for members
* Fix member service tracks dirty changes test
* Remove no longer existing property types from member type builder
* Fix null error in UpdateMemberProperties
* Fix builder tests
* Fix SetupMemberTestData in MemberControllerUnitTests
* Let LastLoginDate be null and handle check in controller
There's no reason to default a perfectly nullable property to default(DateTime)
* Add translation key for is approved and use that instead of constant
* Obsolete old label constants
* Fix whitespace post merge
* Fix up test comments
* Apply suggestions from code review
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
* Fix member properties always being sensitive
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
* Adding TrackedReferencesController
* Adding/changing views
* Adding/Editing js files
* RelationService changes
* RelationRepository changes
* Adding missing translations
* Adding/Modifying tests
* Beginning of #9125 migration
* Introducing a new component + refactoring based on that
* Abstracting + refactoring
* Work on content unpublishing
* Work on media.delete
* Various small changes
* Beginning of #9119 migration
* Changes on content.delete
* Various fixes
* Adding new keys used in the listview bulk actions
* Adding methods to get the items used in relations from array of ids
* Adding the checkLinkedItems function to the trackedReferencesResource
* Passing the selected items from a listview to unpublish and delete
* Adding umb-tracked-references-listview
* Adding umb-tracked-references-listview-table with language column
* Fixes for tracked references
* Changes in listview unpublish dialog
* Changes in listview delete dialog
* Removing Variants logic as it is not currently supported
* Visual fixes
* Closing dialogs on click
* Fix wording
* Fix breaking changes
* Change to a single title "Items in use" instead of 2 different for Content and Media
* No need for obsoleting because we can change new controllers
* Return ActionResult from actions
* V9: Prevent delete or unpublish of items that have references (#12047)
* Introducing config settings that prevent delete or unpublish of items referenced by other items
* Disable deletion of content items and show a new warning
* Disable deletion of media items and show a new warning
* Disable deletion of list view items
* Disable unpublish and bulk unpublish
* Add a new warning
* V9: Displaying descendants in use as part of item tracking (#12039)
* Replace HasReferencesInDescendants with GetPagedDescendantsInReferences
* Display descendants in use on parent's info tab
* Add getPagedDescendantsInReferences to trackedReferencesResource
* Add lang keys for Descendants in use
* Refactoring controller actions
* Don't call check descendants usage when it is a new item
* rename busfy to busy
* always show references
* rearrange for scrollbar to appear at the edge of the dialog
* use the word referenced instead of used
* change fallback texts
* Added "IsDependency" to relation types
* refactor of umb-tracked-references
* rename checkLinkedItems to getPagedReferencedItems
* rename check to load, to be consistent with the rest.
* Refactored backend . Needs frontend fixes
* Cleanup
* Use filters
* Front-end refactor to match refactored end-points
* Fixed bug + warning
* Fixed query (more then 2100 descensdants) and optimized it (using nested select instead of inner join).
* remove comment
* hideNoneDependencies including varying text for the configuration
* Hack for SqlCE :(
* some final adjustments for item tracking ui
* Unbreak change
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>