Merge pull request #11650 from strapi/v4/remove-relation-private-cts

Prevent relation to api token and locale
This commit is contained in:
Alexandre BODIN 2021-11-23 11:41:54 +01:00 committed by GitHub
commit 08d27c0ea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -19,7 +19,11 @@ const getRestrictRelationsTo = (contentType = {}) => {
return ['oneWay', 'manyWay'];
}
if (uid.startsWith(coreUids.PREFIX) || uid === pluginsUids.UPLOAD_FILE) {
if (
uid.startsWith(coreUids.PREFIX) ||
uid === pluginsUids.UPLOAD_FILE ||
!isContentTypeVisible(contentType)
) {
return [];
}

View File

@ -13,6 +13,9 @@ module.exports = {
'content-manager': {
visible: false,
},
'content-type-builder': {
visible: false,
},
},
attributes: {
action: {

View File

@ -13,6 +13,9 @@ module.exports = {
'content-manager': {
visible: false,
},
'content-type-builder': {
visible: false,
},
},
attributes: {
name: {