Skip to content

CasbinRuby/casbin-ruby-redis-watcher

Repository files navigation

Ruby casbin redis watcher

Casbin role watcher to be used for monitoring updates to casbin policies

Installation

gem 'casbin-ruby'
gem 'casbin-ruby-redis-watcher'

Basic Usage

require 'casbin-ruby'
require 'casbin-ruby-redis-watcher'

enforcer = Casbin::Enforcer.new("path/to/model.conf", "path/to/policy.csv")
redis = Redis.new
watcher = CasbinWatcher::Redis.new(redis)
watcher.update_callback = -> { enforcer.load_policy }
enforcer.watcher = watcher

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages