Skip to content

Instantly share code, notes, and snippets.

View brainsnorkel's full-sized avatar

Chris Gentle brainsnorkel

View GitHub Profile
@bmjsmith
bmjsmith / Admin.scala
Created July 22, 2012 20:07
Securing play 2.0 controllers sans boilerplate.
object Admin extends SecureableController {
implicit val requiredRight: Option[Right] = Some(Right("admin"))
def categories = authorized[AnyContent] { implicit request =>
Ok(html.adminCategories(Messages("admin.categories.title")))
}
}