For example, if the current user is admin, the Admin button will show.
How to implement this in play2? Is there a standard solution? I don’t find any built-in examples demonstrate this.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, there is no built-in authorization mechanism inside Play.
You could write your own code to do that (maybe it’s just as simple as to look up a flag from a
Userobject). And then there’s Deadbolt 2. I have not tried it myself, but it looks great. And can do lots of stuff. 🙂