From 593fd909cde9f1fc497bf7f4430beccd4880b668 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 2 Feb 2018 17:00:42 +0100 Subject: [PATCH] Fix for a Cut-and-Paste error! --- Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs b/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs index 4d104ec2..3b54b8b3 100644 --- a/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs +++ b/Site/Pages/v5/Ledgers/Json-GeneralLedgerData.aspx.cs @@ -26,12 +26,6 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers DateTime dawnOfMankind = new DateTime (1901, 1, 1); // no org will ever import bookkeeping from before this date - FinancialAccount account = CurrentOrganization.FinancialAccounts.AssetsBankAccountMain.Children.First(); - if (account.OrganizationId != CurrentOrganization.Identity) - { - throw new UnauthorizedAccessException ("All the nopes in the world"); - } - if (!CurrentAuthority.HasAccess (new Access (CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Read))) { throw new UnauthorizedAccessException ("Access denied because security tokens say so"); @@ -95,7 +89,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers string creditString = string.Empty; string debitString = string.Empty; - account = accountLookup[row.FinancialAccountId]; + FinancialAccount account = accountLookup[row.FinancialAccountId]; if (!runningBalanceLookup.ContainsKey(row.FinancialAccountId)) { if (account.AccountType == FinancialAccountType.Asset || account.AccountType == FinancialAccountType.Debt)