[Neos] Make your own privilege: Why is MethodPrivilegeInterface hard-coded in class PolicyEnforcement

Olle Haerstedt o.haerstedt at bitmotion.de
Mon Apr 20 15:48:08 CEST 2015


I'm trying to make my own privilege to use in the policy settings.

I made a class

class TestPrivilege extends AbstractPrivilege {

The class AbstractPrivilege in turn implements the interface PrivilegeInterface.

The thing is, in function invoke() in class PolicyEnforcement, the interface
MethodPrivilegeInterface is hard-coded instead of PrivilegeInterface when searching for privileges, 
meaning my own TestPrivilege is never executed. When I change the PolicyEnforcement class to 
include all PrivilegeInterface classes, my class is executed though. Is this a bug or
am I missing something?

Kind regards

More information about the Neos mailing list