6

Everyone I was wondering if anyone knows of any Java libraries that are similar to or offer the same functionality as CanCan (Ruby on Rails). Would love to know your experiences with them if any.

CanCan is an authorization library for Ruby on Rails which restricts what resources a given user is allowed to access. All permissions are defined in a single location (the Ability class) and not duplicated across controllers, views, and database queries.

Bonus points if it works on the play framework (http://playframework.org)

Brad Mace
  • 27,194
  • 17
  • 102
  • 148
Mark Ellul
  • 1,906
  • 3
  • 26
  • 37

3 Answers3

3

Here is one Example https://github.com/eltados/canny of something very similar? Has anyone got any experience using this?

Mark Ellul
  • 1,906
  • 3
  • 26
  • 37
3

Checkout this lib:

https://casbin.org/

https://github.com/casbin/jcasbin

You can use a library in your application. Also, you can deploy it as a service and integrate your application to it.

Abdulrazak Alkl
  • 923
  • 8
  • 14
2

Does Spring Security not provide similar functionality? See http://static.springsource.org/spring-security/site/docs/3.0.x/reference/el-access.html#el-pre-post-annotations for examples of annotation-based authorization specifications...

Joseph Ottinger
  • 4,911
  • 1
  • 22
  • 23