Testing if user is allow with a function (not an annotation)

104 Views Asked by At

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 ?

1

There are 1 best solutions below

2
Steve Chaloner On

You need to call be.objectify.deadbolt.core.DeadboltAnalyzer.