From ff322c146af048eb518b794a1de636a0bee56f2e Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 18 Apr 2015 12:28:24 +0200 Subject: [PATCH] More checkpoint --- Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs | 4 ++-- Site5/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs b/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs index c1c51ee6..2a9ecea0 100644 --- a/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs +++ b/Site5/Pages/v5/Ledgers/Json-AccountPlanData.aspx.cs @@ -30,8 +30,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers this._year = DateTime.Today.Year; if ( - !this._authenticationData.CurrentUser.PositionAssignment.HasAccess (new Access ( - this._authenticationData.CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Read), this._authenticationData.CurrentUser)) + !this._authenticationData.Authority.HasAccess (new Access ( + this._authenticationData.CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Read))) { throw new UnauthorizedAccessException(); } diff --git a/Site5/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs b/Site5/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs index 0e2b6117..f6112098 100644 --- a/Site5/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs +++ b/Site5/Pages/v5/Ledgers/Json-InspectLedgerData.aspx.cs @@ -46,7 +46,7 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers throw new UnauthorizedAccessException ("All the nopes in the world"); } - if (!CurrentUser.PositionAssignment.HasAccess (new Access (CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Read), CurrentUser)) + if (!CurrentAuthority.HasAccess (new Access (CurrentOrganization, AccessAspect.Bookkeeping, AccessType.Read))) { throw new UnauthorizedAccessException ("Access denied because security tokens say so"); } @@ -55,8 +55,8 @@ namespace Swarmops.Frontend.Pages.v5.Ledgers DateTime balanceStart = dawnOfMankind; bool zeroStart = false; bool zeroEnd = false; - bool displayDescription = CurrentUser.PositionAssignment.HasAccess (new Access (CurrentOrganization, AccessAspect.BookkeepingDetails, AccessType.Read), CurrentUser); - bool canSeeAudit = CurrentUser.PositionAssignment.HasAccess(new Access(CurrentOrganization, AccessAspect.Auditing, AccessType.Read), CurrentUser); + bool displayDescription = CurrentAuthority.HasAccess (new Access (CurrentOrganization, AccessAspect.BookkeepingDetails, AccessType.Read)); + bool canSeeAudit = CurrentAuthority.HasAccess(new Access(CurrentOrganization, AccessAspect.Auditing, AccessType.Read)); if (month > 0 && month <= 12) {