Horde: Include the claim type in the list of responses returned from the account groups endpoint.

[CL 31681151 by ben marsh in ue5-main branch]
This commit is contained in:
ben marsh
2024-02-21 09:58:40 -05:00
parent 277df74c20
commit 9eac7145d4
@@ -6,6 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using EpicGames.Horde.Accounts;
using EpicGames.Horde.Dashboard;
using EpicGames.Horde.Server;
using Horde.Server.Accounts;
@@ -282,14 +283,14 @@ namespace Horde.Server.Dashboard
/// </summary>
[HttpGet]
[Route("/api/v1/dashboard/accountgroups")]
public ActionResult<IReadOnlyList<string>> GetAccountGroupClaims()
public ActionResult<List<AccountClaimMessage>> GetAccountGroupClaims()
{
if (!_globalConfig.Value.Authorize(AccountAclAction.CreateAccount, User) && !_globalConfig.Value.Authorize(AccountAclAction.UpdateAccount, User))
{
return Forbid();
}
return Ok(_globalConfig.Value.GetValidAccountGroupClaims());
return Ok(_globalConfig.Value.GetValidAccountGroupClaims().Select(x => new AccountClaimMessage(HordeClaimTypes.Group, x)).ToList());
}
}
}