private bool CheckToSkipUPKZSighting(DemandAdjustment da) { if (SecurityEntityService.CheckTrusteeWithIdIsInRole(da.CreatorId, BudgetRole.Curator) || SecurityEntityService.CheckTrusteeWithIdIsInRole(da.CreatorId, BudgetRole.UPKZHead)) { return(true); } return(false); }
public bool CheckInitiatorIsHead(Guid billDemandUid) { using (var scope = ReadCommittedSupressedScope) { using (var context = this.CreateContext()) { var billDemand = GetBillDemand(context, billDemandUid); return(billDemand.AuthorId.HasValue && (SecurityEntityService.CheckTrusteeWithIdIsInRole(billDemand.AuthorId.Value, BudgetRole.DivisionHead))); } } }