* 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>
* Allow Tree endpoints that query entities to return count without entity data
* Apply count by take 0 in FileSystem Endpoints
* Apply count by take 0 in Dictionary Endpoints
* Apply count by take 0 in RootRelationType Endpoints
* Revert PaginationService takeZero flag as it only guards against things that already blow up
* Mark PagedResult as Obsolete as we want to step away from classic pagination system to skip/take
* Pushed management api RelationType pagination and async preperation down to the service layer
* Scope fix and allocation optimizations
* Pushed management api dictionary pagination and down to the service layer
Also did some nice allocation optimizations
* PR feedback + related strange count behaviour
* Moved count by pagesize logic from EntryController to service
* A tiny bit of formatting and comments
* Fix bad count filter logic
* Added integration tests for creating datatypes in a folder
* Added tests for count testing on TreeControllers
- ChildrenDataType
- RootDataType
- ChildrenDictionary
- RootDictionary
- ChildrenDocument
- RootDocument
- RootBluePrint
- RootDocumentType
- ChildrenDocumentType
* Revert "Added tests for count testing on TreeControllers", should be on services
This reverts commit ee2501fe620a584bba13ecd4fdce8142133fd82b.
This reverts commit 808d5b276fad267a645e474ead3278d4bb79d0c4.
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* 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>
* Add post and delete methods to user-group/id/users to add/remove users from group
* Update OpenApi contract
* PR feedbac
Moved fetch usergroup logic into service layer
Renamed methods to async
* Naming
* Introduced user not found on UserGroupOperationStatus, as otherwise the return message is wrong
* Added authentication
* Removed authorization from the service layer as its determined that that responsibiliity does not belong there.
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>