public void Cannot_execute_ReportQueries_without_permissions() { // Arrange LogWithNewAdmin(Modules.PlayerManager, Permissions.Update); // Act Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetAdminActivityLog()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetAdminAuthenticationLog()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetMemberAuthenticationLog()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetPlayerRecords()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetPlayerRecordsForExport()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetPlayerBetHistoryRecords()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetPlayerBetHistoryRecordsForExport()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetDepositRecords()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetDepositRecordsForExport()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetBrandRecords()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetBrandRecordsForExport()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetLicenseeRecords()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetLicenseeRecordsForExport()); //Assert.Throws<InsufficientPermissionsException>(() => _reportQueries.GetLanguageRecords()); //Assert.Throws<InsufficientPermissionsException>(() => _reportQueries.GetLanguageRecordsForExport()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetVipLevelRecords()); Assert.Throws <InsufficientPermissionsException>(() => _reportQueries.GetVipLevelRecordsForExport()); }
public JsonResult LicenseeData(SearchPackage searchPackage) { var dataBuilder = new SearchPackageDataBuilder <LicenseeRecord>(searchPackage, _queries.GetLicenseeRecords()); var data = dataBuilder .Map(r => r.LicenseeId, r => new object[] { r.Name, r.CompanyName, r.EmailAddress, r.AffiliateSystem, r.ContractStart, r.ContractEnd, r.Status, r.CreatedBy, r.Created, r.UpdatedBy, r.Updated, r.ActivatedBy, r.Activated, r.DeactivatedBy, r.Deactivated }) .GetPageData(r => r.Created); return(new JsonResult { Data = data, MaxJsonLength = int.MaxValue, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }