mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Delete comments
This commit is contained in:
parent
5c7f92e557
commit
82f3eb2a29
@ -159,97 +159,5 @@ describe('authorization', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// Wolle describe('access reports protected propertied', () => {
|
|
||||||
// const reportsQuery = gql `
|
|
||||||
// query {
|
|
||||||
// reports {
|
|
||||||
// id
|
|
||||||
// createdAt
|
|
||||||
// updatedAt
|
|
||||||
// rule
|
|
||||||
// disable
|
|
||||||
// closed
|
|
||||||
// filed
|
|
||||||
// reviewed
|
|
||||||
// resource
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// `
|
|
||||||
|
|
||||||
// describe('unauthenticated', () => {
|
|
||||||
// beforeEach(() => {
|
|
||||||
// authenticatedUser = null
|
|
||||||
// })
|
|
||||||
// it("throws an error and does not expose the owner's email address", async () => {
|
|
||||||
// await expect(
|
|
||||||
// query({ query: reportsQuery, variables: { name: 'Owner' } }),
|
|
||||||
// ).resolves.toMatchObject({
|
|
||||||
// errors: [{ message: 'Not Authorised!' }],
|
|
||||||
// data: { User: [null] },
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
// describe('authenticated', () => {
|
|
||||||
// describe('as the owner', () => {
|
|
||||||
// beforeEach(async () => {
|
|
||||||
// authenticatedUser = await owner.toJson()
|
|
||||||
// })
|
|
||||||
|
|
||||||
// it("exposes the owner's email address", async () => {
|
|
||||||
// variables = { name: 'Owner' }
|
|
||||||
// await expect(query({ query: reportsQuery, variables })).resolves.toMatchObject({
|
|
||||||
// data: { User: [{ email: 'owner@example.org' }] },
|
|
||||||
// errors: undefined,
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
// describe('as another regular user', () => {
|
|
||||||
// beforeEach(async () => {
|
|
||||||
// authenticatedUser = await anotherRegularUser.toJson()
|
|
||||||
// })
|
|
||||||
|
|
||||||
// it("throws an error and does not expose the owner's email address", async () => {
|
|
||||||
// await expect(
|
|
||||||
// query({ query: reportsQuery, variables: { name: 'Owner' } }),
|
|
||||||
// ).resolves.toMatchObject({
|
|
||||||
// errors: [{ message: 'Not Authorised!' }],
|
|
||||||
// data: { User: [null] },
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
// describe('as a moderator', () => {
|
|
||||||
// beforeEach(async () => {
|
|
||||||
// authenticatedUser = await moderator.toJson()
|
|
||||||
// })
|
|
||||||
|
|
||||||
// it("throws an error and does not expose the owner's email address", async () => {
|
|
||||||
// await expect(
|
|
||||||
// query({ query: reportsQuery, variables: { name: 'Owner' } }),
|
|
||||||
// ).resolves.toMatchObject({
|
|
||||||
// errors: [{ message: 'Not Authorised!' }],
|
|
||||||
// data: { User: [null] },
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
// describe('as an administrator', () => {
|
|
||||||
// beforeEach(async () => {
|
|
||||||
// authenticatedUser = await administrator.toJson()
|
|
||||||
// })
|
|
||||||
|
|
||||||
// it("exposes the owner's email address", async () => {
|
|
||||||
// variables = { name: 'Owner' }
|
|
||||||
// await expect(query({ query: reportsQuery, variables })).resolves.toMatchObject({
|
|
||||||
// data: { User: [{ email: 'owner@example.org' }] },
|
|
||||||
// errors: undefined,
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -31,7 +31,6 @@ export default {
|
|||||||
return reviewTransactionResponse.records.map(record => record.get('review'))
|
return reviewTransactionResponse.records.map(record => record.get('review'))
|
||||||
})
|
})
|
||||||
const [reviewed] = await reviewWriteTxResultPromise
|
const [reviewed] = await reviewWriteTxResultPromise
|
||||||
// Wolle console.log('reviewed: ', reviewed)
|
|
||||||
return reviewed || null
|
return reviewed || null
|
||||||
} finally {
|
} finally {
|
||||||
session.close()
|
session.close()
|
||||||
|
|||||||
@ -29,12 +29,10 @@ export default {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
log(fileReportTransactionResponse)
|
log(fileReportTransactionResponse)
|
||||||
// Wolle return fileReportTransactionResponse.records.map(transformReturnType)
|
|
||||||
return fileReportTransactionResponse.records.map(record => record.get('filedReport'))
|
return fileReportTransactionResponse.records.map(record => record.get('filedReport'))
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
const [filedReport] = await fileReportWriteTxResultPromise
|
const [filedReport] = await fileReportWriteTxResultPromise
|
||||||
// Wolle console.log('filedReport: ', filedReport)
|
|
||||||
return filedReport || null
|
return filedReport || null
|
||||||
} finally {
|
} finally {
|
||||||
session.close()
|
session.close()
|
||||||
|
|||||||
@ -43,13 +43,22 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
filterOptions() {
|
filterOptions() {
|
||||||
return [
|
return [
|
||||||
{ label: this.$t('moderation.reports.filterLabel.all'), value: { reviewed: null, closed: null } },
|
{
|
||||||
|
label: this.$t('moderation.reports.filterLabel.all'),
|
||||||
|
value: { reviewed: null, closed: null },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: this.$t('moderation.reports.filterLabel.unreviewed'),
|
label: this.$t('moderation.reports.filterLabel.unreviewed'),
|
||||||
value: { reviewed: false, closed: false },
|
value: { reviewed: false, closed: false },
|
||||||
},
|
},
|
||||||
{ label: this.$t('moderation.reports.filterLabel.reviewed'), value: { reviewed: true, closed: false } },
|
{
|
||||||
{ label: this.$t('moderation.reports.filterLabel.closed'), value: { reviewed: null, closed: true } },
|
label: this.$t('moderation.reports.filterLabel.reviewed'),
|
||||||
|
value: { reviewed: true, closed: false },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: this.$t('moderation.reports.filterLabel.closed'),
|
||||||
|
value: { reviewed: null, closed: true },
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
modalData() {
|
modalData() {
|
||||||
|
|||||||
@ -25,11 +25,7 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<template v-for="report in reports">
|
<template v-for="report in reports">
|
||||||
<!-- should be ':key="report.resource.id"' for having one element for every resource, but this crashes at the moment, because the 'reports' query returns multiple reports on the same resource! I will create an issue -->
|
<!-- should be ':key="report.resource.id"' for having one element for every resource, but this crashes at the moment, because the 'reports' query returns multiple reports on the same resource! I will create an issue -->
|
||||||
<report-row
|
<report-row :key="report.id" :report="report" @confirm-report="$emit('confirm', report)" />
|
||||||
:key="report.id"
|
|
||||||
:report="report"
|
|
||||||
@confirm-report="$emit('confirm', report)"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</table>
|
</table>
|
||||||
<hc-empty v-else icon="alert" :message="$t('moderation.reports.empty')" />
|
<hc-empty v-else icon="alert" :message="$t('moderation.reports.empty')" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user