More checkpoint

This commit is contained in:
Rick Falkvinge
2015-04-18 12:28:24 +02:00
parent 5e758e6c07
commit ff322c146a
2 changed files with 5 additions and 5 deletions
@@ -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();
}
@@ -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)
{