mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-10 00:34:27 +01:00
Greenfield API: Get current User
Builds on #1368 This PR adds a new endpoint: Get current user.. It only returns the current user's id and email for now( let's extend later) It also adds a new permission: `ProfileManagement` which is needed for this endpoint (and for update endpoints later)
This commit is contained in:
@@ -34,6 +34,9 @@ namespace BTCPayServer.Security.APIKeys
|
||||
bool success = false;
|
||||
switch (requirement.Policy)
|
||||
{
|
||||
case Policies.CanModifyProfile.Key:
|
||||
success = context.HasPermissions(Permissions.ProfileManagement);
|
||||
break;
|
||||
case Policies.CanListStoreSettings.Key:
|
||||
var selectiveStorePermissions =
|
||||
Permissions.ExtractStorePermissionsIds(context.GetPermissions());
|
||||
|
||||
Reference in New Issue
Block a user