mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Fix story picture definition
This commit is contained in:
@@ -90,6 +90,7 @@ return call_user_func(
|
||||
if ($subdefObj->get_class() == 'thumbnail') {
|
||||
$all_access = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -198,6 +198,14 @@ class ACL implements cache_cacheableInterface
|
||||
|
||||
public function has_access_to_subdef(record_Interface $record, $subdef_name)
|
||||
{
|
||||
if ($subdef_name == 'thumbnail') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($record->is_grouping()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
$subdef_class = $record->get_databox()->get_subdef_structure()
|
||||
->get_subdef($record->get_type(), $subdef_name)
|
||||
@@ -205,6 +213,7 @@ class ACL implements cache_cacheableInterface
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$granted = false;
|
||||
|
||||
if ($subdef_class == databox_subdef::CLASS_THUMBNAIL) {
|
||||
@@ -215,7 +224,7 @@ class ACL implements cache_cacheableInterface
|
||||
$granted = true;
|
||||
} elseif ($subdef_class == databox_subdef::CLASS_DOCUMENT && $this->has_right_on_base($record->get_base_id(), 'candwnldhd')) {
|
||||
$granted = true;
|
||||
} elseif ($subdef_class == databox_subdef::CLASS_DOCUMENT && $user->ACL()->has_hd_grant($record)) {
|
||||
} elseif ($subdef_class == databox_subdef::CLASS_DOCUMENT && $this->has_hd_grant($record)) {
|
||||
$granted = true;
|
||||
}
|
||||
|
||||
|
@@ -1053,7 +1053,7 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
|
||||
$subdef_def = $this->get_databox()->get_subdef_structure()->get_subdef($type, $name);
|
||||
|
||||
if ($this->has_subdef($name) && ! $this->get_subdef($name)->is_substituted()) {
|
||||
if ($this->has_subdef($name) && $this->get_subdef($name)->is_physically_present()) {
|
||||
|
||||
$path_file_dest = $this->get_subdef($name)->get_pathfile();
|
||||
$this->get_subdef($name)->remove_file();
|
||||
|
Reference in New Issue
Block a user