mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
Fix ACL cache issue
This commit is contained in:
@@ -119,6 +119,11 @@ class ACL implements cache_cacheableInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function set_app(Application $app)
|
||||||
|
{
|
||||||
|
$this->app = $app;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a hd grant has been received for a record
|
* Check if a hd grant has been received for a record
|
||||||
*
|
*
|
||||||
|
@@ -370,6 +370,8 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
|||||||
self::$_instance[$id] = new self($id, $app);
|
self::$_instance[$id] = new self($id, $app);
|
||||||
$app['phraseanet.appbox']->set_data_to_cache(self::$_instance[$id], '_user_' . $id);
|
$app['phraseanet.appbox']->set_data_to_cache(self::$_instance[$id], '_user_' . $id);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
self::$_instance[$id]->set_app($app);
|
||||||
}
|
}
|
||||||
|
|
||||||
return array_key_exists($id, self::$_instance) ? self::$_instance[$id] : false;
|
return array_key_exists($id, self::$_instance) ? self::$_instance[$id] : false;
|
||||||
@@ -392,6 +394,9 @@ class User_Adapter implements User_Interface, cache_cacheableInterface
|
|||||||
protected function set_app(Application $app)
|
protected function set_app(Application $app)
|
||||||
{
|
{
|
||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
|
if (null !== $this->ACL) {
|
||||||
|
$this->ACL->set_app($app);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user