Add post and delete methods to user-group/id/users to add/remove user… (#15490)

* 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>
This commit is contained in:
Sven Geusens
2023-12-22 08:05:45 +01:00
committed by GitHub
parent 4b3131fda4
commit 8acb5665e8
8 changed files with 395 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
using Umbraco.Cms.Core.Models.Membership;
namespace Umbraco.Cms.Core.Models;
public class UsersToUserGroupManipulationModel
{
public Guid UserGroupKey { get; init; }
public Guid[] UserKeys { get; init; }
public UsersToUserGroupManipulationModel(Guid userGroupKey, Guid[] userKeys)
{
UserGroupKey = userGroupKey;
UserKeys = userKeys;
}
}