changed CaseInvolvement to reference case provisions
This commit is contained in:
parent
240a55f54f
commit
6069ac0901
@ -10,8 +10,11 @@ class CaseInvolvement {
|
|||||||
|
|
||||||
public static function userIsInvolved($account, $case) {
|
public static function userIsInvolved($account, $case) {
|
||||||
$actorId = self::getLinkedActorId($account);
|
$actorId = self::getLinkedActorId($account);
|
||||||
$involvedIds = array_column($case->actors_involved->getValue(), 'target_id');
|
$query = \Drupal::entityQuery('oc_case_provision')
|
||||||
return in_array($actorId, $involvedIds);
|
->condition('provider', $actorId)
|
||||||
|
->condition('case', $case);
|
||||||
|
$results = $query->execute();
|
||||||
|
return !empty($results);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function userIsInvolved_activity($account, $activity) {
|
public static function userIsInvolved_activity($account, $activity) {
|
||||||
|
Reference in New Issue
Block a user