mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-19 07:53:14 +00:00
Fix granted bases order
This commit is contained in:
@@ -621,14 +621,23 @@ class ACL implements cache_cacheableInterface
|
|||||||
$this->load_rights_bas();
|
$this->load_rights_bas();
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
|
||||||
foreach ($this->_rights_bas as $base_id => $datas)
|
foreach($this->appbox->get_databoxes() as $databox)
|
||||||
{
|
{
|
||||||
$continue = false;
|
if ($sbas_ids && !in_array($databox->get_sbas_id(), $sbas_ids))
|
||||||
|
|
||||||
if ($sbas_ids && !in_array(phrasea::sbasFromBas($base_id), $sbas_ids))
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($databox->get_collections() as $collection)
|
||||||
|
{
|
||||||
|
$continue = false;
|
||||||
|
|
||||||
|
if(!array_key_exists($collection->get_base_id(), $this->_rights_bas))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$base_id = $collection->get_base_id();
|
||||||
|
$datas = $this->_rights_bas[$base_id];
|
||||||
|
|
||||||
foreach ($rights as $right)
|
foreach ($rights as $right)
|
||||||
{
|
{
|
||||||
if (!$this->has_right_on_base($base_id, $right))
|
if (!$this->has_right_on_base($base_id, $right))
|
||||||
@@ -649,6 +658,7 @@ class ACL implements cache_cacheableInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user