* Refactor to accept multiple cultures
* Add test
* Move logic into service
* Remember to complete scope
* Move scope creation.
* Add test
* Close scope on early return
* Handle invalid cultures with bad request
* Handle valid cultures based on content
* Change return type if a culture is required
* Refactor content publishing service to have 1 unpublish method
* Update tests
* Return better error
* Scope completes
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Refactored the Authorizers to be reuseable from core by now knowing about principal but only the IUser. Also moved them to core
* Fix multiple enumeration
* Fix more multiple enumerations
---------
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
* Make create user endpoint work with the supplied id
Return 201 instead of 200 with correct resource identifier
* Add ResetPassword endpoint
* Bring changepassword route inline with other resource actions
* Fixed User endpoints not advertising all their possible response codes/ models
Fixed certain endpoints not authorizing targeted user(s) versus the admin needs admin authorization requirement
Fixed a user not found response bug for the update flow
Fix spacing
* Fixed CurrentUser endpoints not advertising all their possible response codes/ models
Fix incorrect responseStatus in UserService.GetPermissionsAsync
* Update OpenApi definition
Fix smal model oversights in previous commits
* Update incorrect Response type
* Check for duplicate id's in user create validation
* Remove unnecasary returnmodel from changepassword
Renamed the model to it's remaining usage
* rename bad constructor parameter
* Renamed method parameters for better readability and usage
* Fixed wrong userkey being passed down because of (refactored) bad naming
Technically doesn't change anything as the two id's should be the same in this case (reset with token is always for self)
* Fixed resetpassword bug
* Update openapi
* Update src/Umbraco.Core/Services/UserService.cs
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Remove old password from change user password request model
Only makes sense when doing it for the logged in user => current endpoint
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Add models & mapping
* Add controller
* Add create async to service
* Add auth policy
* Implement delete
* Rename response model
* Implement updateAsync
* Refactor update to use own model
* Implement all async counterparts for IMemberService
* Add tests
* Implement update member group mapping
* Dont fail if updating the current user group
* Return not found if not found
* Add missing OperationResults to MemberGroupOperationStatusResult
* Add 404 to response type
* Update openapi
* Update OpenApi
* Update OpenApi.json
* Output notification handler messages as a header
* Make the notification contract public
* Moved the Notification type and added it to swagger schema
* Update swagger docs
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* 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>
* 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>
* Added Endpoint to get Document restore information
* Add media version of original paent recycle bin
update document permission
regisered interfaces
* Added restore endpoints
* PR feedback and other cleanup
* Update orignal root parent logic & shrank return model
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Fixing route for temp file
* Adding missing ApiController attribute
* Adding new filter view port
* Creating base classes for member and user filters
* Moving actual filter controllers to correct places
* Update OpenApi.json
* Only use datetimeoffset in API
* Updated publish endpoint to take schedule information
* Fixed test builds
* OpenApi updates
* Update OpenApi schema
* Fixed issues with publishing.
* Added validation before publishing. Had to move a lot of classes to core.
* added missing files
* Added validation info to error
* Typo
* Clean up and adding missing result
* Updating to AvailableCultures instead of PublishedCultures
* Handle time needs to be in the future
* validate only cultures that needs to be published
* Fix typos
* Filter out cultures that we are not trying to publish from the validation errors
* Don't filter out only the available cultures, to accommodate non-created variants
* Only allow publish of existing cultures
* Fixed issues found in test
* fixed build
---------
Co-authored-by: Elitsa <elm@umbraco.dk>
* Adding missing members policy
* Adding a member filter endpoint
* Adding response types to user filter endpoint
* Adding create multiple to factory
* Updating OpenApi.json
* Fix authz status
* Adding another silo for list views
* Adding base classes and handling collection operation statuses
* Change signature to reuse functionality. Fix references
* Adding collection response models
* Adding content and media type collection response models
* Adding mapping
* Adding mapping for document and media types
* Adding list view page model
* Initial implementation
* Moving implementation to service base
* Adding content and media service interfaces for handling list views
* Registering and implementation
* Update controllers to use new services
* Renaming param
* Refactor to pass content type instead of content type key
* Handle the case where only data type is provided
* Add missing operation status
* Update OpenApi.json
* Added comment for a temp workaround
* Removing orderCulture from media interface as it is not yet supported
* Adding a base class for content type collection reference model
* Adding common collection controller base and moving the ContentCollectionOperationStatusResult to there
* Cleaning up controllers after implementing the base class
* Cleaning up concrete controller bases
* OpenApi.json updates
* Changing GetPagedChildren to return a paged model
* Fix ordering
* Adding ,
* Fix wording
* Append operation status to unsuccessful API responses
* A little bit of clean-up
* Update default orderBy value
* Update the default value of orderBy
* Adding missing owner and updater system fields
* Updating OpenApi.json with owner and updater props
* Create base and rename owner to creator
* Update OpenApi.json
* Reordering of properties
* "Owner" will be "creator"
* Fix comment
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Bugfix: MediaCacheRefresher needs to always clear the mediaCache no matter what the publishedState is
* fix: check correct permissions for deleteDocumentFromRecycleBin
* Fix: ImageCropper propertyValues should not hold invalid values.
* Added media delete endpoints
* PR comment fix: Do not schedule cleanup if we know the file does not exist.
* resolved forward merge build conflicts
namespace cleanup
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* Re-modelling API models (take two)
* Do not use "content" - use "document" and "media" instead.
* Move "item" endpoints to their own silo
* Use "Id", not "Key"
* Regenerate OpenApi.json
* Rename user start node IDs from "content" to "document"
* Regererate OpenApi.json after forward merge
* update importmap
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Members and member types in the Management API
* Add validation endpoints for members
* Include validation result in service response + add unit tests
* Regenerate OpenApi.json
* Regenerate OpenApi.json after merge
* Don't throw an exception when trying to set valid variation levels for member types
* Added missing ProducesResponseType
* Remove TODO, as that works
* Allow creation of member with explicit key
* Do not feature "parent" for member creation + add missing response type
* Do not feature a "Folder" in create member type (folders are not supported)
* Added missing build methods
* Fixed issue with mapping
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Clean up ContentControllerBase and move document related operations to DocumentControllerBase
* Rename content to document
---------
Co-authored-by: Elitsa <elm@umbraco.dk>
* 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
* Rename InstallVResponseModel to InstallRequestModel
* Align SettingsInstallController
* Rename split DatabaseInstallResponseModel in two
* Change UserInstallResponseModel to UserInstallViewModel
* Use PresentationModel instead of ViewModel
* Use operation status pattern when validating database
* Prepare for install to return a message
* Begin updating steps
* Make StepBase sharable between upgrade and install
* Update steps
* Use error message from install steps in install controller
* Use error message from upgrade steps in upgrade controller
* Use 500 for install/upgrade failed
It's entirely likely that it has nothing to do with the request
* Updated OpenApi.Json
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* 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
* Updated naming to route correctly
* Added a check for null
* Added another status code for the PublicAccess
* Added a check for null
* Updated naming to match route
* Added attempt pattern
* added a ProblemDetailsBuilder for the EntryNotFound
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@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>
* 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>
* First stab at a massive remake of file system based endpoints
* Do not prefix system paths with directory separator char
* Ensure correct and consistent response types
* Fix partial view snippets endpoints
* Clean up IO (path) operations
* Update OpenAPI JSON to match new endpoints
* Return 201 when renaming file system resources
* Add "IsFolder" to file system item endpoints
* Replace "parentPath" with a "parent" object for file system creation endpoints
* Update OpenAPI JSON
* Rewrite snippets
* Regenerate OpenAPI JSON after forward merge
* Remove stylesheet overview endpoint
* Regenerate OpenAPI JSON after forward merge
* add server-file-system module to importmap
* Expose generated resource identifier in 201 responses
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* 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>
* Added management API for dynamic root and query steps.
* Open API
* Split models, use required and rename a little
* Rename query steps
* Make request culture and segment optional
* Introduce explicit back-office variation context
* Simplify query endpoint path
* Correct field naming
* Updated OpenApi.json
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Create new request models
* Create new structural operation status
* Handling of new structural operation status
* New CopyAsync and MoveAsync
* New endpoints
* Update schema
* Adding NotFound status
* Adding BadRequest response type
* Moving getbyid check to service
* Fix signature and implement get by id check in service
* Update OpenApi schema
* Use PUT instead of POST in "move" controllers
* Use PUT instead of POST in some more "move" controllers
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Implement user configuration endpoint
* Add password configuration factory
* refactor users to use new password configuration model
* Implement current user configuration endpoint
* Add auth policy
* Refacor current user to use PasswordConfigurationReponseModel
* Implement configuration security controller
* Rename property to less confusing name
* Add version to ConfigurationSecurityController.cs
* Review changes
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Implement temporary file configuration endpoint
* Update MaxfileSize to be a string.
* Make max file size a nullable integer
---------
Co-authored-by: Elitsa <elm@umbraco.dk>