4 ms·
I had a look at Casbin in the past, in search of a Go equivalent of Ruby's CanCanCan. But Casbin looks way too complicated to use. So in the end I wrote my own
by FooBarWidget 6y ago
I had a look at Casbin in the past, in search of a Go equivalent of Ruby's CanCanCan. But Casbin looks way too complicated to use. So in the end I wrote my own unreusable, poor man's version of CanCanCan in Go specifically for use in my app (with lots of boilerplate and duplication because Go has no generics).
Does anybody else have a better experience with Casbin, or have recommendations on a CanCanCan-like alternative for Go?
- alejo 6y agoI’m currently building a service and I’m using casbin for authorization. So far so good, but my requirements at the moment are fairly simple. This will change in the future and it’s one of the reasons I picked it: it’s easy to evolve the permissions layer without changing almost any code. In terms of my experience so far it was a bit tricky at first but once I grasped the concept it became easy to integrate. Most of the blogs with examples I found were in Chinese and the documentation is sometimes confusing to read, so you may need to overcome that part. A few weeks ago I learned about Oso[1] which looks really nice but I haven’t tried it yet. They publish some nice posts about the subject in their academy[2] [1] https://www.osohq.com/ https://www.osohq.com/ [2] https://www.osohq.com/developers/authorization-academy https://www.osohq.com/developers/authorization-academy