Merge branch 'merge-actors'
This commit is contained in:
2
common
2
common
Submodule common updated: 71b58d5099...ec0812ad9d
@@ -520,7 +520,7 @@ const fields = computed(() => [
|
|||||||
key: 'tattoos',
|
key: 'tattoos',
|
||||||
type: 'has',
|
type: 'has',
|
||||||
value: {
|
value: {
|
||||||
has: actor.value?.hasTattoos || null,
|
has: actor.value?.hasTattoos ?? null,
|
||||||
description: actor.value?.tattoos || null,
|
description: actor.value?.tattoos || null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -529,7 +529,7 @@ const fields = computed(() => [
|
|||||||
type: 'has',
|
type: 'has',
|
||||||
note: 'Excludes earrings',
|
note: 'Excludes earrings',
|
||||||
value: {
|
value: {
|
||||||
has: actor.value?.hasPiercings || null,
|
has: actor.value?.hasPiercings ?? null,
|
||||||
description: actor.value?.piercings || null,
|
description: actor.value?.piercings || null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -576,7 +576,7 @@ const fields = computed(() => [
|
|||||||
note: 'Allow this actor to be assigned to scenes automatically, overriding single-name protections.',
|
note: 'Allow this actor to be assigned to scenes automatically, overriding single-name protections.',
|
||||||
hasDescription: false,
|
hasDescription: false,
|
||||||
value: {
|
value: {
|
||||||
has: actor.value?.isGlobal || null,
|
has: actor.value?.allowGlobalMatch ?? null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -630,6 +630,9 @@ const keyMap = {
|
|||||||
has: 'hasPiercings',
|
has: 'hasPiercings',
|
||||||
description: 'piercings',
|
description: 'piercings',
|
||||||
},
|
},
|
||||||
|
allowGlobalMatch: {
|
||||||
|
has: 'allowGlobalMatch',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const groupMap = {
|
const groupMap = {
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ const keyMap = {
|
|||||||
hasTattoos: 'has_tattoos',
|
hasTattoos: 'has_tattoos',
|
||||||
hasPiercings: 'has_piercings',
|
hasPiercings: 'has_piercings',
|
||||||
isCircumcised: 'circumcised',
|
isCircumcised: 'circumcised',
|
||||||
|
allowGlobalMatch: 'allow_global_match',
|
||||||
};
|
};
|
||||||
|
|
||||||
const socialsOrder = ['onlyfans', 'fansly', 'twitter', 'instagram', 'loyalfans', 'manyvids', 'pornhub', 'linktree', null];
|
const socialsOrder = ['onlyfans', 'fansly', 'twitter', 'instagram', 'loyalfans', 'manyvids', 'pornhub', 'linktree', null];
|
||||||
@@ -131,6 +132,7 @@ export function curateActor(actor, context = {}) {
|
|||||||
...actor.avatar,
|
...actor.avatar,
|
||||||
sfw_media: actor.sfw_avatar,
|
sfw_media: actor.sfw_avatar,
|
||||||
}),
|
}),
|
||||||
|
allowGlobalMatch: actor.allow_global_match,
|
||||||
socials: context.socials?.map((social) => ({
|
socials: context.socials?.map((social) => ({
|
||||||
id: social.id,
|
id: social.id,
|
||||||
url: social.url,
|
url: social.url,
|
||||||
@@ -816,7 +818,7 @@ async function applyActorRevision(revisionIds, reqUser) {
|
|||||||
return applyActorSocialsDelta(revision.actor_id, delta, trx);
|
return applyActorSocialsDelta(revision.actor_id, delta, trx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (delta.key === 'name' && reqUser.role === 'admin') {
|
if (['name', 'allowGlobalMatch'].includes(delta.key) && verifyAbility(reqUser, 'actor', 'update')) {
|
||||||
return applyActorDirectDelta(revision.actor_id, delta, trx);
|
return applyActorDirectDelta(revision.actor_id, delta, trx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user