removed commented-out code

This commit is contained in:
naomi 2022-01-20 15:42:37 +00:00
parent 7c3b007ff9
commit f783fa2373
2 changed files with 3 additions and 29 deletions

View File

@ -200,35 +200,6 @@ function opencase_cases_theme_suggestions_oc_case(array $variables) {
return $suggestions;
}
//function opencase_views_query_alter(Drupal\views\ViewExecutable $view, $query) {
// if ($view->getBaseEntityType() && $view->getBaseEntityType()->id() == 'oc_case') {
// $query->addTag('oc_case_access');
// }
// if ($view->getBaseEntityType() && $view->getBaseEntityType()->id() == 'oc_activity') {
// $query->addTag('oc_activity_access');
// }
//}
//
//function opencase_query_oc_case_access_alter($query) {
// if (\Drupal::currentUser()->hasPermission('view published case entities')) {
// return;
// }
// $linked_actor_id = CaseInvolvement::getLinkedActorId(\Drupal::currentUser());
// $query->addJoin('INNER', 'oc_case__actors_involved', 'access_filter', 'access_filter.entity_id = oc_case_field_data.id');
// $query->condition('access_filter.actors_involved_target_id', $linked_actor_id);
//}
//
//function opencase_query_oc_activity_access_alter($query) {
// if (\Drupal::currentUser()->hasPermission('view published case entities')) {
// return;
// }
// $linked_actor_id = CaseInvolvement::getLinkedActorId(\Drupal::currentUser());
// $query->addJoin('INNER', 'oc_case__actors_involved', 'access_filter', 'access_filter.entity_id = oc_activity_field_data.oc_case');
// $query->condition('access_filter.actors_involved_target_id', $linked_actor_id);
//}
/**
* Implements hook_theme_suggestions_HOOK().
*/

View File

@ -1,4 +1,7 @@
permission_callbacks:
- \Drupal\opencase_entities\OCEventPermissions::generatePermissions
- Drupal\opencase_entities\OpenCaseEntityPermissions::permissions
view edit delete all actor entities:
title: 'View/Edit/Delete all types of people'