playframework/Play20 — pull request #87 by ksvladimir (2012-01-21 18:00:43+00:00)
Title: Several improvements for mvc.Security

* Moved Security.Authenticated to Security[User] trait to allow applications to define custom User objects
* Added Security.Authorized method to check for authorization conditions:

```scala
Authorized (_.isAdmin) { user =>
Action( request =>
Ok("Hello, Admin")
}
}
```

* Added Security.MaybeAuthenticated method to support action that behave differently for registered and anonymous users:

```scala
MaybeAuthenticated { user =>
Action( request =>
Ok("Hello, " + user.getOrElse("Anonymous"))
}
}
```