[SOLVED] Privilege trouble after upgrade to flow 4.3.1

Hello flow developpers!

We have an (working) application developed with flow 3.3.
Now we want to upgrade to flow 4.

For testing I’ve copied our project directory to an other and did the upgrade.
But I could not do it the “recommended” way because we are using SVN.
That is why I removed “Packages/Libraries”, “Packages/Framework” and “Packages/Application/Flowpack.Behat” and replaced them from a fresh
"installation" (done with composer create-project… ), replaced few files in “Build” and modified necessary files in “Configuration” (base dir) and application dir.
Double checked all replacements from “TYPO3” to “Neos”.

Now executing a flow command, I get this Error:

privilege target "fsix.k2:SetupController.Actions", referenced in role configuration "fsix.k2:Administrator" is not defined!

My (unchanged!) Policy.yaml looks like this:

privilegeTargets:
  Neos\Flow\Security\Authorization\Privilege\Method\MethodPrivilege:

    fsix.k2:SetupController.Actions:
      matcher: 'method(fsix\k2\Controller\SetupController->.*Action())'

roles:
  'fsix.k2:Administrator':
    privileges:
      -
        privilegeTarget: 'fsix.k2:SetupController.Actions'
        permission: GRANT

  Neos.Flow:Everybody:
    privileges: []
      -
        privilegeTarget: 'fsix.k2:SetupController.Actions'
        permission: DENY

  Neos.Flow:Anonymous:
    privileges:
      -
        privilegeTarget: fsix.k2:SetupController.Actions
        permission: DENY

(only removed several other definitions to reduce to main problem presented here).

Of course this is not the best way to upgrade - I know…

If I have a look at flow “PolicyService” there is

$this->policyConfiguration['privilegeTargets'] => array(0) {}

Has someone an idea what do with this issue?
Thank’s!

Sounds like a dependency issue in your composer.json - does it say typo3/flow or neos/flow in the require section? The correct format is neos/flow

Hi Soren!

Thank’s for your reply.
I’ve checked this. And you are right!

For those who are interrested:

Replaced “typo3” with “neos” in these files:

  • composer.json
  • Build/BuildEssentials/composer.json
  • Packages/Application/fsix/k2/composer.json

Additionally I needed a

./flow flow:package:rescan

1 Like