Code Monkey home page Code Monkey logo

deadbolt-2's Introduction

Deadbolt 2 - An authorisation system for Play 2

Deadbolt is a powerful authorisation mechanism for defining access rights to certain controller methods or parts of a view.

For a complete guide, please refer to the deadbolt-2-guide.

The deadbolt-2 repository in GitHub is a collection of submodules. I highly recommend that you fork/follow/clone specific submodules in place of this aggregate module. The submodules are:

Demonstration applications can be found at

Which version should I use?

The architecture and versioning nomenclature of Deadbolt 2 changed for version 2.1 in order to clean up and normalise the code. As a result, there are incompatibilities between the versions for Play 2.0 and Play 2.1.

Firstly, you need to add the Objectify repository to your Build.scala file so the Deadbolt jars can be resolved

val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
  resolvers += Resolver.url("Objectify Play Repository", url("http://schaloner.github.com/releases/"))(Resolver.ivyStylePatterns),
  resolvers += Resolver.url("Objectify Play Snapshot Repository", url("http://schaloner.github.com/snapshots/"))(Resolver.ivyStylePatterns)
)

If you're using Play 2.0, don't forget to change the mainLang as necessary!

Play 2.0

If you're using Play 2.0, add the following to your Build.scala

val appDependencies = Seq(
  "be.objectify" %% "deadbolt-2" % "1.1.3"
)

If you're using Scala, I strongly recommend you use Deadbolt 2.1. Versions before this had very poor Scala support. The 2.1 re-design was partially aimed at correcting this.

Play 2.1

For Play 2.1, you need to use the Deadbolt 2.1 in your project. Add one or both of the following to Build.scala according to your requirements

val appDependencies = Seq(
  "be.objectify" %% "deadbolt-java" % "2.1-RC2",
  "be.objectify" %% "deadbolt-scala" % "2.1-RC2"
)

deadbolt-2's People

Contributors

juanmirocks avatar schaloner avatar diogotavaresdealmeidaribeiro avatar kouphax avatar madmatah avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.