Use accessbility checks
This commit is contained in:
@@ -39,6 +39,7 @@ module.exports = function (options) {
|
||||
creatorId: request.user.id,
|
||||
name: translationArtifactVersion.name,
|
||||
artifactVersionId: translationArtifactVersion.artifactVersionId,
|
||||
accessibility: translationArtifactVersion.accessibility,
|
||||
userId: request.user.id,
|
||||
dialectId: translationArtifactVersion.dialectId,
|
||||
forkedFromId: translationArtifactVersion.id,
|
||||
@@ -53,6 +54,7 @@ module.exports = function (options) {
|
||||
return {
|
||||
creatorId: request.user.id,
|
||||
chapterId: translationChapter.chapterId,
|
||||
index: translationChapter.index,
|
||||
translationChunks: translationChapter.translationChunks.map(translationChunk => {
|
||||
if (translationChunk.translation) {
|
||||
existingTranslation[translationChunk.chunkId] = {
|
||||
@@ -198,6 +200,7 @@ module.exports = function (options) {
|
||||
creatorId: userId,
|
||||
name: dialect.name,
|
||||
artifactVersionId: artifactVersion.id,
|
||||
accessibility: artifactVersion.artifact.accessibility,
|
||||
dialectId: dialect.id,
|
||||
userId: userId,
|
||||
owner: {
|
||||
@@ -211,6 +214,7 @@ module.exports = function (options) {
|
||||
return {
|
||||
creatorId: userId,
|
||||
chapterId: chapter.id,
|
||||
index: chapter.index,
|
||||
translationChunks: chapter.chunks.map(chunk => {
|
||||
return {
|
||||
creatorId: userId,
|
||||
@@ -246,6 +250,7 @@ module.exports = function (options) {
|
||||
creatorId: userId,
|
||||
name: artifactVersion.translationArtifactVersions[0].name,
|
||||
artifactVersionId: artifactVersion.translationArtifactVersions[0].artifactVersionId,
|
||||
accessibility: artifactVersion.artifact.accessibility,
|
||||
userId: userId,
|
||||
dialectId: artifactVersion.translationArtifactVersions[0].dialectId,
|
||||
forkedFromId: artifactVersion.translationArtifactVersions[0].id,
|
||||
@@ -260,6 +265,7 @@ module.exports = function (options) {
|
||||
return {
|
||||
creatorId: userId,
|
||||
chapterId: chapter.id,
|
||||
index: chapter.index,
|
||||
translationChunks: chapter.chunks.map(chunk => {
|
||||
return {
|
||||
creatorId: userId,
|
||||
|
||||
Reference in New Issue
Block a user