Authenticated user can see cases they are a provider for.
This commit is contained in:
@ -1,8 +1,4 @@
|
||||
|
||||
permission_callbacks:
|
||||
- \Drupal\opencase_entities\OCOrganisationPermissions::generatePermissions
|
||||
- \Drupal\opencase_entities\OCEventPermissions::generatePermissions
|
||||
- Drupal\opencase_entities\OpenCaseEntityPermissions::permissions
|
||||
|
||||
view edit delete all actor entities:
|
||||
title: 'View/Edit/Delete all types of people'
|
||||
|
@ -26,12 +26,12 @@ class OCActivityAccessControlHandler extends EntityAccessControlHandler {
|
||||
}
|
||||
return AccessResult::allowedIf(
|
||||
$account->hasPermission('view published case entities') // activity permissions are inherited from case
|
||||
|| $entity->owner()->id() == $account->id();
|
||||
|| $entity->getOwner()->id() == $account->id()
|
||||
);
|
||||
case 'update': // allowed only if a) they can see the case the activity is on and b) they can edit activities
|
||||
return AccessResult::allowedIf(
|
||||
$account->hasPermission('edit activity entities') // activity permissions are inherited from case
|
||||
|| $entity->owner()->id() == $account->id();
|
||||
|| $entity->getOwner()->id() == $account->id()
|
||||
);
|
||||
case 'delete': // allowed only if a) they can see the case the activity is on and b) they can delete activities
|
||||
return AccessResult::allowedIf(
|
||||
|
Reference in New Issue
Block a user