Skip to content

Commit

Permalink
Fix up user relationship.
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-vessey committed Apr 16, 2024
1 parent 383b510 commit 7ab191b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions embargo.views.inc
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,19 @@ function embargo_views_data_alter(array &$data) {
'label' => \t('Embargoes'),
],
];
$data['users_field_data']['embargo__exempt_users'] = [
'title' => \t('Embargo exemptions'),
'help' => \t('Embargoes for which the given user is specifically exempt.'),
'relationship' => [
'id' => 'entity_reverse',
'field_name' => 'embargo__exempt_users',
'entity_type' => 'embargo',
'field table' => 'embargo__exempt_users',
'field field' => 'exempt_users_target_id',
'base' => 'embargo',
'base field' => 'id',
'label' => \t('Embargo exemptions'),
],
];

}

0 comments on commit 7ab191b

Please sign in to comment.