I have two custom entities (Adhérents and Personnes) linked to each other and to User.
- One 'Adhérent' is mainly a "family" and has these fields: label, adresse (postal address), Téléphone (landline phone number), date d'adhésion (Membership start date).
- One 'Personne' is a "person" ;-) and has these fields: Nom (Lastname), Prénom (Firstname), Portable (Cellphone number).
Each 'Personne' is linked to one 'Adhérent'. One 'Adhérent' may be linked to many 'Personne' (one of these 'Personne' being the 'contact'). Each 'Personne' is linked to one 'User'.
'Personne' is defined as entity_reference for 'Adhérent' (as the 'Contact'):
$fields['contactid'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Contact'))
->setSetting('target_type', 'association_personne')
'Adhérent' is defined as entity_reference for 'Personne':
$fields['adherentid'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Adhérent'))
->setSetting('target_type', 'association_adherent')
'User' is defined as entity_reference for 'Personne':
$fields['userid'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Utilisateur'))
->setRequired(TRUE)
->setSetting('target_type', 'user')
I use Views to publish all these contents (see Screen captures below).
When I look at the output with a user with no specific rights (i.e. not Administrator), some of the data are not displayed:
- In the 'Adhérents' view, the Contact column is empty (see capture 2) while there is a link to the entity (see capture 1).
- In the 'Personnes' view, the link to the entity_reference 'Adhérents' is there but the link to 'User' that should display email address (see capture 3) is completely absent, the column header is not even there (see capture 4).
Any idea?
The Permissions as they are set: