Commit Graph

182 Commits

Author SHA1 Message Date
Kenn Jacobsen
976bca456e Remove macros (#15794)
* Remove macros!

* Clean up snippets

* Add migration that deletes all macros

* Review comments
2024-02-29 15:11:06 +01:00
Nikolaj Geisle
b8577e3af2 V14: Unpublish multiple cultures (#15789)
* 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>
2024-02-29 14:38:47 +01:00
Kenn Jacobsen
04849948f1 Fix build errors for user permissions (#15797) 2024-02-29 11:40:47 +01:00
Bjarke Berg
cf9b00bffc Refactor authorizers to be reusable from the core project (#15782)
* 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>
2024-02-29 10:41:56 +01:00
Sven Geusens
393d178b58 User endpoint additions and corrections (#15773)
* 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>
2024-02-29 10:40:48 +01:00
Nikolaj Geisle
1e043cbcfb V14: Member group controller (#15669)
* 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
2024-02-29 09:16:27 +01:00
Kenn Jacobsen
fa007ac257 Output notification handler messages as a header (#15786)
* 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>
2024-02-28 15:09:08 +01:00
Kenn Jacobsen
4b4b003fc6 Add filter option to the "dictionar overview" endpoint (#15777) 2024-02-28 12:41:32 +01:00
Bjarke Berg
2494d8c5aa Granular permissions in Management API (#15734)
* 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>
2024-02-27 21:57:02 +01:00
Nikolaj Geisle
595ee242aa V14: Remove old backoffice project. (#15752)
* 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>
2024-02-27 12:40:30 +01:00
Kenn Jacobsen
4443f8b88a Validate collisions in domain assignments (#15759)
* Validate collisions in domain assignments

* Update OpenApi.json
2024-02-26 15:52:02 +01:00
Bjarne Fyrstenborg
f47830b165 V14: Webhook Management API (#15147)
* Add webhook to management api

* Update webhook controllers

* Add ByKey webhook controller

* Fix typo

* Fix typo

* Update multiple webhooks

* Update using

* Remove duplicate constant after merge

* Fix typo in file name

* Update casing of IWebhookService

* Fix typo

* Use Webhook entity type

* Fix ambiguous reference

* Update webhook mapping

* Update after change of CreatedAtAction

* Use CreatedAtId instead

* Update src/Umbraco.Cms.Api.Management/Controllers/Webhook/ByKeyWebhookController.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.Api.Management/Controllers/Webhook/ByKeyWebhookController.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.Api.Management/ViewModels/Webhook/CreateWebhookRequestModel.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.Api.Management/Controllers/Webhook/DeleteWebhookController.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.Api.Management/Controllers/Webhook/CreateWebhookController.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Add Guid to WebhookResponseModel

* Cleanup

* Add Auth

* Move webhook logic from backoffice to management api

* Add mapping

---------

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2024-02-26 14:35:35 +01:00
Bjarke Berg
6016ecb9cf Updated openapi and added response type to temp file config 2024-02-26 10:33:59 +01:00
Kenn Jacobsen
7b80d59c36 Align tree item namespaces (#15754) 2024-02-23 11:27:48 +01:00
Sven Geusens
00dade48f6 Document and Media restore endpoints (#15681)
* 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>
2024-02-22 17:37:27 +01:00
Kenn Jacobsen
918457d9f8 Output "operationStatus" for error scenarios whenever possible (#15703) 2024-02-22 15:17:06 +01:00
Kenn Jacobsen
ac01abd55f Clean up leftovers from old dictionary pagination (#15747) 2024-02-22 13:03:25 +01:00
Elitsa Marinovska
76e1db87a7 V14: Align routes (#15732)
* 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
2024-02-21 12:29:22 +01:00
Kenn Jacobsen
d9aed7f9a7 Ensure that data types required by the core cannot be deleted. (#15738)
* Ensure that data types required by the core cannot be deleted.

* Update OpenApi.json
2024-02-21 10:22:22 +01:00
Bjarke Berg
608f2e3c76 Scheduled publishing in Management API (#15680)
* 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>
2024-02-21 09:10:48 +01:00
Elitsa Marinovska
5b1fab1165 V14: Member collection view/filter endpoint (#15727)
* Adding missing members policy

* Adding a member filter endpoint

* Adding response types to user filter endpoint

* Adding create multiple to factory

* Updating OpenApi.json
2024-02-18 16:06:41 +01:00
Elitsa Marinovska
ec1ba6031f V14: Document and media collection view endpoints (#15696)
* 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>
2024-02-14 15:13:56 +01:00
Sven Geusens
024bb8903c V14/feature/delete media in recyblebin (#15636)
* 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>
2024-02-07 10:44:20 +01:00
Kenn Jacobsen
9d07268ead Remove template scaffolding from the API (#15659)
* Remove template scaffolding from the API

* Regenerate OpenApi.json

* Regenerate OpenApi.json after forward merging
2024-02-07 09:07:54 +01:00
Kenn Jacobsen
183b5cc454 Management API model mapping take two (#15667)
* 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>
2024-02-06 13:19:30 +01:00
Kenn Jacobsen
71b3076de9 Members and member types in the Management API (#15662)
* 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>
2024-02-05 06:42:07 +01:00
Kenn Jacobsen
d29e05efb7 Move document related operations to DocumentControllerBase (#15661)
* Clean up ContentControllerBase and move document related operations to DocumentControllerBase

* Rename content to document

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-02-01 11:29:52 +01:00
Kenn Jacobsen
296b7e061a Align presentation model factory naming (#15663) 2024-02-01 11:22:16 +01:00
Elitsa Marinovska
a562198520 Rename items to item to be consistent (#15660) 2024-02-01 09:23:10 +01:00
Kenn Jacobsen
d631ef1802 Move the ContentControllerBase to the correct location (#15656) 2024-01-31 16:22:15 +01:00
Nikolaj Geisle
0dd2beb484 V14: Update DataTypeControllerBase to use GetAllAsync() (#15641)
* Update to use GetAllAsync()

* Obsolete GetAll

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-01-31 15:00:47 +01:00
Kenn Jacobsen
aaf7075313 Property level validation for Management API (#15644)
* 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
2024-01-31 10:40:58 +01:00
Mole
8c8405bbbf V14: Fix up install controller (#15646)
* 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>
2024-01-30 13:12:08 +01:00
Kenn Jacobsen
9b454bec6b Model mapping PoC (#15546)
* 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
2024-01-30 12:19:05 +01:00
Andreas Zerbst
bb46d23730 V14 Bugfix, fixed some of the document controllers (#15449)
* 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>
2024-01-29 12:58:03 +01:00
Nikolaj Geisle
e7749ecb58 V14/feature/more configuration endpoints (#15603)
* Add template configuration endpoint

* Implement template endpoint

* rename template configuration response model

* Implement package configuration endpoint

* Add media configuration endpoint

* Implement document configuration endpoint

* Refactor enabled to disabled

* implement document type configuratio endpoint

* Add required to view model properties

* Update OpenApi.json
2024-01-26 11:03:22 +01:00
Mole
76181a8af4 V14: Migrate JsonConfigManipulator to System.Text.Json (#15609)
* Minor cleanup

* Remove old obsoleted property

* Reimplement save connection string

* Remove old method using newtonsoft

* Implement RemoveConnectionStringAsync

* Implement SaveConfigValue

* Implement SaveDisableRedirectUrlTracking

* Cleanup

* Implement SetGlobalIdAsync

* Fix recursive default implementation

* Split manipulating dom and saving json

Otherwise SaveConnectionStringAsync would write twice.

* Add some documentation strings

* Reduce indentation

* Obsolete non-async methods

* Move JsonConfigManipulator to correct namespace and make it internal
2024-01-24 11:07:18 +01:00
Bjarke Berg
aaca7a5ff4 2FA for users in management API (#15607)
* 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>
2024-01-23 18:07:21 +01:00
Sven Geusens
26761cc04a Implemented culture based authorization for content (#15580)
* 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>
2024-01-22 21:08:20 +01:00
Sven Geusens
acc71b6d45 Add management api delete document endpoints (#15600)
* Added Delete document endpoint

* Added delete from recylebin endpoint

Added/restructured unittests

* Clarifications

* Moved document specific mapping from base recyclebin to document recyclebin

* Refactor OperationStatusResult mapping trough inheritance

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2024-01-22 15:58:18 +01:00
Elitsa Marinovska
bb0395349f V14: Fix composition endpoints namespaces (#15620)
* Fix namespace in media type related classes

* Fix namespace in document type composition related classes
2024-01-22 14:11:11 +01:00
Kenn Jacobsen
e4f9f98f2d File system endpoints redo (#15521)
* 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>
2024-01-22 08:20:45 +01:00
Sven Geusens
1fe39de589 Add missing empty recycle bin endpoints (#15602)
* Added empty document recyble bin

* Made EmptyDocumentRecycleBinController leaner

Cleaned up obsolete constructor

* Added empty media recycle bin endpoint

* Cleanup

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Elitsa <elm@umbraco.dk>
2024-01-19 10:58:33 +01:00
Kenn Jacobsen
5429aa78a5 "Created at" responses should not have a response body (#15590) 2024-01-17 13:37:24 +01:00
Elitsa Marinovska
547da0b191 V14: Composition endpoints for Document and Media types (#15584)
* 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>
2024-01-17 08:36:27 +01:00
Bjarke Berg
40a28a938c Management API for dynamic root and query steps. (#15505)
* 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>
2024-01-16 07:47:43 +01:00
Elitsa Marinovska
c5c24d36d9 V14: Copy and move endpoints for content and media types (#15553)
* 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>
2024-01-12 08:59:21 +01:00
Nikolaj Geisle
8516a7b2e5 V14: Add security related configurations (#15557)
* 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>
2024-01-11 10:30:22 +01:00
Nikolaj Geisle
a6ccd5a7a9 Implement temporary file configuration endpoint (#15518)
* 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>
2024-01-10 09:20:29 +01:00
Nikolaj Geisle
3acda751b9 v14: Add Preview controller (#15481)
* Add Preview controller

* Implement PreviewService

* Add tests for endpoints.

* Add Authorization to previews

* Apply suggestions from code review

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2024-01-09 15:51:59 +01:00