mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
WIP
This commit is contained in:
@@ -1761,11 +1761,11 @@ class ACL implements cache_cacheableInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of collections on which the user is 'order master'
|
||||
* Returns base ids on which user is 'order master'
|
||||
*
|
||||
* @return collection[]
|
||||
* @return array
|
||||
*/
|
||||
public function get_order_master_collections()
|
||||
public function getOrderMasterCollectionsBaseIds()
|
||||
{
|
||||
$sql = 'SELECT base_id FROM basusr WHERE order_master="1" AND usr_id= :usr_id';
|
||||
$result = $this->app->getApplicationBox()
|
||||
@@ -1780,6 +1780,18 @@ class ACL implements cache_cacheableInterface
|
||||
$baseIds[] = $item['base_id'];
|
||||
}
|
||||
|
||||
return $baseIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of collections on which the user is 'order master'
|
||||
*
|
||||
* @return collection[]
|
||||
*/
|
||||
public function get_order_master_collections()
|
||||
{
|
||||
$baseIds = $this->getOrderMasterCollectionsBaseIds();
|
||||
|
||||
$groups = [];
|
||||
|
||||
foreach ($this->app['repo.collection-references']->findHavingOrderMaster($baseIds) as $index => $reference) {
|
||||
|
Reference in New Issue
Block a user