Moebius
Moebius

Reputation: 6508

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

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 ?

Upvotes: 1

Views: 101

Answers (1)

Steve Chaloner
Steve Chaloner

Reputation: 8202

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

Upvotes: 1

Related Questions