Exemplo n.º 1
0
        public IHttpActionResult MemberAuthData([FromUri] SearchPackage searchPackage)
        {
            VerifyPermission(Permissions.View, Modules.MemberAuthenticationLog);

            var brandFilterSelections = _adminQueries.GetBrandFilterSelections();
            var logs        = _reportQueries.GetMemberAuthenticationLog().Where(x => brandFilterSelections.Contains(x.BrandId));
            var dataBuilder = new SearchPackageDataBuilder <MemberAuthenticationLog>(searchPackage, logs);

            var data = dataBuilder
                       .Map(r => r.Id, r => new object[]
            {
                r.Brand,
                r.DatePerformed,
                r.PerformedBy,
                r.IPAddress,
                r.Success,
                r.FailReason,
                r.Headers
            })
                       .GetPageData(r => r.DatePerformed);

            return(Ok(data));
        }
Exemplo n.º 2
0
        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());
        }