I want to test permissions of a user in my controller, but I need the name of the permission to change at runtime (sometime it is "projectWrite", sometime "userWrite"...), but annotation need a constant, so I can't use it.
I need to use a function, but I don't know how to ask for the authorisation via function. How to do this ?