Révision 7d7b5830
Ajouté par Assos Assos il y a environ 9 ans
drupal7/sites/all/modules/entity/includes/entity.wrapper.inc | ||
---|---|---|
504 | 504 |
while (!($entity instanceof EntityDrupalWrapper) && isset($entity->info['parent'])) { |
505 | 505 |
$entity = $entity->info['parent']; |
506 | 506 |
} |
507 |
if ($entity instanceof EntityDrupalWrapper && !$entity->entityAccess('update', $account)) {
|
|
507 |
if ($entity instanceof EntityDrupalWrapper && $entity->entityAccess('update', $account) === FALSE) {
|
|
508 | 508 |
return FALSE; |
509 | 509 |
} |
510 | 510 |
} |
... | ... | |
515 | 515 |
elseif ($op == 'edit' && isset($info['setter permission'])) { |
516 | 516 |
return user_access($info['setter permission'], $account); |
517 | 517 |
} |
518 |
// If access is unknown, we return TRUE. |
|
518 | 519 |
return TRUE; |
519 | 520 |
} |
520 | 521 |
|
... | ... | |
809 | 810 |
if (!empty($this->info['parent'])) { |
810 | 811 |
// If this is a property, make sure the user is able to view the |
811 | 812 |
// currently referenced entity also. |
812 |
return $this->entityAccess('view', $account) && parent::access($op, $account); |
|
813 |
if ($this->entityAccess('view', $account) === FALSE) { |
|
814 |
return FALSE; |
|
815 |
} |
|
816 |
if (parent::access($op, $account) === FALSE) { |
|
817 |
return FALSE; |
|
818 |
} |
|
819 |
// If access is unknown, we return TRUE. |
|
820 |
return TRUE; |
|
813 | 821 |
} |
814 | 822 |
else { |
815 | 823 |
// This is not a property, so fallback on entity access. |
Formats disponibles : Unified diff
Weekly update of contrib modules