The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Fixed kekrozsak:security:init some more

Signed-off-by: Gergely Polonkai <polesz@w00d5t0ck.info>
master
Polonkai Gergely 10 years ago
parent 29a72c1605
commit 6a0bb96c5a
  1. 10
      src/KekRozsak/SecurityBundle/Command/SecurityInitCommand.php

@ -49,19 +49,19 @@ EOF
$aclProvider = $container->get('security.acl.provider');
$classNames = array(
'KekRozsak\\FrontBundle\\Entity\\News',
'KekRozsak\\FrontBundle\\Entity\\Articles',
'newsClass' => 'KekRozsak\\FrontBundle\\Entity\\News',
'articlesClass' => 'KekRozsak\\FrontBundle\\Entity\\Articles',
);
$securityIdentity = new RoleSecurityIdentity('ROLE_ADMIN');
foreach ($classNames as $className) {
$objectIdentity = new ObjectIdentity('class', $className);
foreach ($classNames as $id => $className) {
$objectIdentity = new ObjectIdentity($id, $className);
try {
$acl = $aclProvider->findAcl($objectIdentity, array($securityIdentity));
} catch (AclNotFoundException $e) {
$acl = $aclProvider->createAcl($objectIdentity);
}
$acl->insertObjectAce($securityIdentity, MaskBuilder::MASK_OWNER);
$acl->insertClassAce($securityIdentity, MaskBuilder::MASK_OWNER);
$aclProvider->updateAcl($acl);
}
}

Loading…
Cancel
Save