Commit Graph

390 Commits

Author SHA1 Message Date
Sven Geusens
80794f3efd [V14] import/export media/document type endpoints (#16100)
* Working import/export media/document types

* WIP

* Refactoring of import doctype/media types

- added analyze endpoint to extract relevant data without fully processing the file
- split up import endpoints into POST & PUT
- removed availableAtAction as the new endpoint allows clients to call the POST/PUT endpoints with confidence
- Added a new service that is responsible for turning temp files into Import compatible XML and being able to extracty partial information from it

* Wrap persistance access in scopes

* Typos, formatting, clean-up

* PR feedback

* update openapi spec

* Changed deleteFile flag to _temporaryFileService.EnlistDeleteIfScopeCompletes

* Itty bitty typo

* Moved magic cleanup into its own method so orchestration can decide when.

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: kjac <kja@umbraco.dk>
2024-05-17 14:35:18 +02:00
Sven Geusens
56e0e1cc2b merge user/current/logins and user/current/login-providers (#16307)
also deleted unused requestmodel

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2024-05-17 09:23:56 +02:00
Elitsa Marinovska
295f6f8720 V14: Backend changes to facilitate Preview mode in Bellissimma (#16279)
* Sends GUID instead of the numeric ID for SignalR Preview Hub

* Add possibility to set cookies as HttpOnly

* Set UMB_PREVIEW cookie as HttpOnly

* fixup! Add possibility to set cookies as HttpOnly

* Refactor ContentFinderByIdPath to more readable

* Create ContentFinderByKeyPath reusing logic from ContentFinderByIdPath

* Add a comment to DisableFindContentByIdPath setting

* Append new content finder

* Change ordering of content finders registrations

* Refactor with a base class

* Update/refactor and add tests regarding ContentFindersByIdentifier

* Fix comment

* Avoiding breaking change

* Make usages use non-obsolete implementation

* Fixed todo in config instead of use the one old legacy name even more. Also obsoleted the ContentFinderByIdPath

* add `preview` as an allowed backoffice client route

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-05-16 15:53:42 +02:00
Nikolaj Geisle
d20892e329 Refactor UserGroupService methods to use attempt (#16302) 2024-05-16 15:04:54 +02:00
Nikolaj Geisle
520e5e4206 V14: Refactor user and usergroups with referency by id model (#16287)
* Refactor user group endpoints to use reference by id models instead

* Update user endpoints to use reference by id models

* Update usergroup ids to ReferenceByIdModel
2024-05-15 14:55:54 +02:00
Mole
bdd231caee V14: Fix null ref exception in current user permission endpoint (#16286)
* Fix null reference exception

* Align behaviour with document and media version
2024-05-15 14:23:04 +02:00
Sven Geusens
742307dc32 [v14] backoffice user login providers endpoint (#16141)
* Added endpoint and backing service for backoffice login providers and the status per user.

* Improve link login redirect forming and error handling

* Add responseModel and mapping instead of returning core model

* Moved unlink endpoint logic into a service

* Refactored ExternalLinkLoginCallback logic into BackofficeExternalLoginService method

* typo and minor code style improvements

* async method name alignment

* Add BackOfficeExternalLoginService tests

* Remove helper method that makes less sense that thought.

* Minor formatting, clean-up and conventions

* Replaced cookie authentication in link-login with a short lived secret

Applied PR feedback

* Update openapi

* Changed link login to a form endpoint

* fix broken comment link

* Do not store claimsprinciple in secret + comments

* update redirect paths

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2024-05-14 15:55:32 +02:00
Nikolaj Geisle
d18bce0ea7 V14: Resize url endpoint (#16275)
* Add image resizing endpoint

* Rename factory

* Actually use height and width

---------

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2024-05-14 10:42:33 +02:00
Jacob Overgaard
22c0c250e0 V14: The login page does not respect certain error codes (#16244)
* handle 403 and unknown error codes from the server

* resolve 2fa errors in repository

error handling was never being activated because this specific endpoint did not return api errors as it works exactly like the "authorize" endpoint, which is being called directly

* chore: add obsolete message to unused `SetupViewPath`

* chore: remove unused events

* add missing labels

* fix: send only 'error' back if the response is not ok

* chore: remove duplicate error handling for 500 errors

* fix: add hack to allow to submit the form on enter click
2024-05-13 12:39:38 +01:00
Bjarke Berg
962bedac29 Ensure we do not expose any cultures we do not accept in languages. Futhermore, I moved it to a service to people can replace the logic (#16265) 2024-05-13 11:09:46 +02:00
Kenn Jacobsen
46864daf7a Use a fixed access token timeout for developer clients (#16255)
* Use a fixed access token timeout for developer clients

* Re-introduce auth persistence in Swagger UI
2024-05-13 09:41:13 +02:00
Bjarke Berg
87c7347900 V14: Reintroduce umbraco api controller as obsolete (#16263)
* Revert "v14: Remove mentions of UmbracoApiController (#15863)"

This reverts commit 30e2dea57a.

* Obsolete UmbracoApiController

* Added a few more obsoletion messages

* Removed some of the reintroduced stuff again

* Add obsoletion to FrontEndRoutes controller

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-05-13 08:28:42 +02:00
Bjarke Berg
b4b512dd53 Return 403 when missing permissions instead of 401 2024-05-10 14:36:25 +02:00
Bjarke Berg
e9074ea97a Return 403 when missing permissions instead of 401 2024-05-10 13:28:15 +02:00
Bjarke Berg
86d98eda8d Return 401 in case the signin was not successfully (#16258) 2024-05-10 11:27:34 +02:00
Elitsa Marinovska
53654d3b28 V14: Return the unhealthy error message from Examine index (#16228)
* Use Attempt<string> result to display the unhealthy error message

* Update OpenApi.json

* Code readability improvements

* Add unittest covering the bug

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2024-05-08 08:41:18 +02:00
Bjarke Berg
2260da210d Management api should use datetimeoffset (#16196)
* Move audit log endpoints to their respective silos and clean up

* Fix failing integration tests

* Using DateTimeOffset in management api and new methods in service layer

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-05-07 08:07:20 +02:00
Nikolaj Geisle
d13278af80 V14: Webhook endpoint fixes (#16215)
* Update to use presentation factory

* remove unused usings

* Update delete endpoint to work

* Remember to map key

* Map key for updating webhooks
2024-05-06 10:25:33 +02:00
Sven Geusens
f9c0235a35 [v14] Add missing alias and id to usergroup related api models (#16154)
* Added missing alias and Id to usergroup models

create/update/response/item

* Changed userGroup IsSystemGroup to more meaningfull fields

Also enforced the AliasCanBeChanged businessrule 🙈

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
2024-05-03 10:24:09 +02:00
Kenn Jacobsen
8ad6c36038 Amend user start node handling (#16094)
* Amend user start node handling

* Add "has root access" to current user endpoint

* Add document and media root access to user response model

* Update OpenApi.json

* Applied API suggestions

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2024-05-03 08:47:10 +02:00
Jacob Overgaard
f0dae526bf add the new oauth_complete path to the list of exemptions for the backoffice client (#16210) 2024-05-02 13:09:20 +02:00
Sven Geusens
2009989f6a [V14] Allow specifying ID on the create package endpoint (#16203)
* Allow package creation to specify the ID

* update openapi

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2024-05-02 11:33:15 +02:00
Nikolaj Geisle
5c02a560f4 Update openapi for webhooks 2024-05-02 09:55:09 +02:00
Nikolaj Geisle
bad211027b Don't validate credentials first (#16199) 2024-05-01 14:42:25 +02:00
Kenn Jacobsen
374d699fd9 Move audit log endpoints to their respective silos and clean up (#16170)
* Move audit log endpoints to their respective silos and clean up

* Fix failing integration tests

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
2024-05-01 12:07:06 +02:00
Elitsa Marinovska
c8180d508b V14: Test new content and media list view service (#16193)
* Fix operation status msg

* Cleanup

* Removing unused status

* Adding WithConfigurationEditor on DataEditorBuilder to be able to create new list views with custom configuration

* Adding list view service tests for content and media

* Adding list view service tests base

* Consistency

* Clean up

* More cleanup

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-05-01 10:54:26 +02:00
Nikolaj Geisle
abcb837eeb Add events v14/feature/add-webhook-events-endpoint (#16192) 2024-05-01 08:28:32 +02:00
Kenn Jacobsen
404cb28c59 Add data type editor UI aliases on upgrade (#16183) 2024-05-01 07:50:26 +02:00
Sven Geusens
d953a78ae6 Add avatarUrls to the userItem responsemodel (#16190)
Move "mapping" to the factory as there are now dependencies to build the model.

Co-authored-by: Sven Geusens <sge@umbraco.dk>
2024-04-30 18:16:30 +02:00
Kenn Jacobsen
b5f24d5297 Add member type icon to member type tree output (#16178) 2024-04-30 15:00:53 +02:00
Kenn Jacobsen
de230334be Add user group filter endpoint (#16087) 2024-04-30 14:55:20 +02:00
Kenn Jacobsen
39e51a4467 Add endpoint for retrieving allowed media types for file extensions (#16189)
* Add endpoint for retrieving allowed media types for file extensions

* Moved paging into service

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2024-04-30 14:26:12 +02:00
Bjarke Berg
3eef9b9579 Add oEmbed endpoint to the management api (#16188)
* OEmbed query endpoint

* Log provider instead of url from user
2024-04-30 14:21:50 +02:00
Bjarke Berg
976146b46e Persist claims from OnExternalLogin event (#16180)
* This fix ensures the claims added doing OnExternalLogin is persisted in the OpenIddict tokens

* Update comment

* Tiniest bit of formatting

---------

Co-authored-by: kjac <kja@umbraco.dk>
2024-04-29 11:54:39 +02:00
Kenn Jacobsen
d1e90dd3d8 Always use IActionResult - not ActionResult (#16145) 2024-04-29 09:07:19 +02:00
Jacob Overgaard
e296c173cc V14: add authorized logout callback path (#16152)
* add option to SecuritySettings.cs to allow the developer to set an authorized logout callback path in line with the login callback path

* allow clients using the "Umbraco back-office access" descriptor to return back to either the login path or the logout path
2024-04-26 08:32:42 +02:00
Kenn Jacobsen
c85b1d4d37 Make public access endpoints work correctly (#16136) 2024-04-25 13:17:24 +02:00
Kenn Jacobsen
7a39314586 Remove all RTE config from appsettings (#16140) 2024-04-25 12:25:47 +02:00
Kenn Jacobsen
ca84d002a4 Fix RTEs stylesheet loading error (#16128) 2024-04-25 12:19:41 +02:00
Zeegaan
37ae17ad20 Use renamed controller 2024-04-25 12:12:56 +02:00
Kenn Jacobsen
0cac0f8b5c Add endpoint for retrieveing the configured default language (#16086)
* Add endpoint for retrieveing the configured default language

* Update OpenApi.json
2024-04-25 11:42:16 +02:00
Bjarke Berg
89755157c1 Support member saving Cancel (#16147)
* Fixes https://github.com/umbraco/Umbraco-CMS/issues/15152

Handle when a notification cancels the member saving operation.

* Fixed unit tests
2024-04-25 10:59:41 +02:00
Kenn Jacobsen
f1e43a7376 Align various controllers (#16137)
* Renamed the language item controllers to follow the current standard (they should not be called "entity")

* Renamed the webhook item controllers to follow the current standard (they should not be called "entity")

* Moved the webhook item controllers to the "/item" silo

* Renamed the user gorup controller base to be singular instead of plural

* Create member group endpoint should yield a 201 created response

* Update member endpoint should yield an empty 200 OK upon success

* Update UpdateUserDataController with correct action name and return an empty 200 OK upon success

* More item endpoints alignment

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
2024-04-25 08:34:21 +02:00
Kenn Jacobsen
c4958365fe Support OpenAPI polymorphic output with JsonDerivedType (#16144) 2024-04-25 08:26:44 +02:00
Nikolaj Geisle
fc9b47a2ea V14: Fixup webhook endpoints (#16143)
* Use presentation factory, as there is no map definition

* Refactor to actually get entities by key
2024-04-24 15:41:32 +02:00
Nikolaj Geisle
c7a1205180 Refactor endpoints to return 0 items if the ids/paths are empty (#16126)
Co-authored-by: Elitsa <elm@umbraco.dk>
2024-04-24 12:28:24 +02:00
Nikolaj Geisle
7bbef2a584 V14: Fix member mapping (#16106)
* convert key to name before saving roles

* Rework MemberEditingService to convert keys

* Rename variable to groups

* Extract to variable
2024-04-23 12:25:36 +02:00
Nikolaj Geisle
4118f441c9 Remove UI settings (#16064) 2024-04-22 13:05:12 +02:00
Nikolaj Geisle
cceb4180f2 V14: Redirect to login screen (#16051)
* Redirect to login screen after flows complete

* Revoke tokens after completing flow

* Use Ok not Redirect

* skip length check
2024-04-19 09:42:13 +02:00
Sven Geusens
d04769a84b V14/feature/all segment endpoint (#16054)
* Added All Segments service with backing noopService

* Add openapi spec

* Apply suggestions from code review

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

* Fix ctor

---------

Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2024-04-18 12:20:26 +02:00