mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Fix: Do not expose xpub without modify store permission (#6212)
This commit is contained in:
@@ -145,9 +145,7 @@ namespace BTCPayServer.Controllers.Greenfield
|
||||
|
||||
if (includeConfig is true)
|
||||
{
|
||||
var canModifyStore = (await _authorizationService.AuthorizeAsync(User, null,
|
||||
new PolicyRequirement(Policies.CanModifyStoreSettings))).Succeeded;
|
||||
if (!canModifyStore)
|
||||
if (!await _authorizationService.CanModifyStore(User))
|
||||
return this.CreateAPIPermissionError(Policies.CanModifyStoreSettings);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user