mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Fix #1693 : Guest users should be able to access detailed view
This commit is contained in:
@@ -917,12 +917,14 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
|
||||
return;
|
||||
}
|
||||
|
||||
protected function authenticate(Application $app)
|
||||
protected function authenticate(Application $app, $user = null)
|
||||
{
|
||||
$user = $user ?: self::$DI['user'];
|
||||
|
||||
$app['session']->clear();
|
||||
$app['session']->set('usr_id', self::$DI['user']->get_id());
|
||||
$app['session']->set('usr_id', $user->get_id());
|
||||
$session = new \Entities\Session();
|
||||
$session->setUsrId(self::$DI['user']->get_id());
|
||||
$session->setUsrId($user->get_id());
|
||||
$session->setUserAgent('');
|
||||
self::$DI['app']['EM']->persist($session);
|
||||
self::$DI['app']['EM']->flush();
|
||||
|
Reference in New Issue
Block a user