Commit 661606fe authored by Ghislain Loas's avatar Ghislain Loas

hotline #71669 fix skilleos

parent a771d75e
......@@ -50,13 +50,28 @@ class Skilleos_Config extends Class_DigitalResource_Config {
public function getSsoUrl($user) {
$module = $this->getDigitalResource()
->getModuleNameFor($this->getName());
return $this->_getSsoUrl($url);
}
public function getAlbumSsoUrl($user, $album) {
if(!$album)
return;
return static::SKILLEOS_URL . '?casid='.$this->getAdminVar('BIB_ID'). '&ticket='.(new Class_CasTicket())->getTicketForCurrentUser();
return $this->_getSsoUrl($user, $album);
}
protected function _getSsoUrl($user, $album) {
$id = $album
? $album->getIdOrigine()
: '';
return static::SKILLEOS_URL . $id
. '?casid='.$this->getAdminVar('BIB_ID')
. '&ticket='.(new Class_CasTicket())->getTicketForUser($user);
}
public function isEnabled() {
return '' != $this->getAdminVar('BIB_ID');
......
......@@ -324,7 +324,6 @@ class SkilleosServiceHarvestTest extends SkilleosServiceTestCase {
$ticket = (new Class_CasTicket())->getTicketForCurrentUser();
$this->assertXPathContentContains('//script','/sigb/sso/602?casid=QUEST&ticket='.$ticket, $this->_response->getBody());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment