Closed ossplus closed 8 years ago
The policy configuration has been added via a pull request by @mrimann: https://github.com/aimeos/aimeos-flow/issues/7
Maybe he can tell you why this has happened
I saw it several times, that adding new PriviledgeTargets does not work until you cleared all caches (e.g. with --force
or by just deleting the Data/Temporary
directory completely).
If that doesn't help, could you copy/paste your Policy.yaml definitions here?
@mrimann ,I delete Data/Temporary directory completely , It still don't work. root@weber:/neos-2.0/Configuration# more Policy.yml
privilegeTargets:
TYPO3\Flow\Security\Authorization\Privilege\Method\MethodPrivilege:
'MyShop:ShopAdminActions':
matcher: 'method(Aimeos\Shop\Controller\(.*)Controller->(.*)Action())'
roles:
'TYPO3.Flow:Everybody':
privileges:
-
privilegeTarget: 'MyShop:ShopAdminActions'
permission: GRANT
I think the source of your issue is a typo in my added text in the Readme. Sorry for that!
The file containing the Policy definition should be named Policy.yaml and not Policy.yml (different file extension)
I've proposed a change to the documentation, see https://github.com/aimeos/aimeos-flow/pull/10
It works now. thanks. But i think this sample Policy.yaml file should be included in the Aimeos package and placed in /Aimeos.Shop/Configuration/ directory.
Hmm, when I added it to the docs I thougt this might be impossible (as it could be a security issue if added packages will bring their own policys or even override existing ones).
I'm not sure whether the Aimeos.Shop-Package for Flow should ship with that by default, or whether it should be added by the Developer that adds the shop (so he knows what he adds and can adapt it to it's needs).
Anyway: If we put it into Aimeos.Shop-Package, it cannot be as it is right now, as the mentioned example in the docs allows everyone full access to everything.
Can the policies added by packages be overwritten? In this case we could add a standard policy file (if you provide one) that allows access to the public parts to everyone, allows access to the MyAccount area to authenticated users and to the admin part to editors only as long as it could be used for other Flow applications too.
I follow the install document, I already added PrivilegeTarget to /neos-2.0/Configuration/Policy.yml And then view http:///shop/list,
: