Skip to content
Snippets Groups Projects
Commit 5f7ee8e7 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #55145 fix rt comments on migration

parent 574d9887
Branches
Tags
5 merge requests!2102#57574 : correction orthographe des jours de la semaine,!2080Sandbox detach zf from storm,!2061Master,!2034Dev#55145 contractuel 2455 le kiosk recherche federee,!2025Dev#55145 contractuel 2455 le kiosk recherche federee
......@@ -67,27 +67,22 @@ class Class_Migration_DigitalResource_LeKiosk {
protected function replacePermission($group) {
$old_rights = $group->getRightsToken();
$permissions = [];
if((pow(2, static::OLD_LEKIOSK_RIGHT_TOKEN) & $old_rights) === pow(2, static::OLD_LEKIOSK_RIGHT_TOKEN))
$permissions[] = Lekiosk_Config::getInstance()->getPermission();
$group
->setRights($group->getRights())
->save();
(new Storm_Model_Collection($permissions))
->eachDo(function($permission) use ($group)
{
$permission->permitTo($group, new Class_Entity());
});
if((pow(2, static::OLD_LEKIOSK_RIGHT_TOKEN) & $old_rights) === pow(2, static::OLD_LEKIOSK_RIGHT_TOKEN)) {
$group
->setRights($group->getRights())
->save();
$permission = Lekiosk_Config::getInstance()
->getPermission();
$permission->permitTo($group, new Class_Entity());
}
return $group;
}
protected function renameMenusKeys() {
foreach(Class_Profil::findAll() as $profil)
foreach(Class_Profil::findTopProfils() as $profil)
$this->searchAndRename($profil);
$this->_cleanMemory();
return $this;
......
......@@ -65,7 +65,7 @@ class Class_Migration_DigitialResource_LeKioskTest extends ModelTestCase {
$profil_adulte = $this->fixture('Class_Profil',
['id' => 22,
'rewrite_url' => 'adulte'])
'parent_id' => null])
->setBrowser('opac')
->setLibelle('Profil Adulte')
->setCfgMenus($cfg_menus);
......
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