Casbin role watcher to be used for monitoring updates to casbin policies
gem 'casbin-ruby'
gem 'casbin-ruby-redis-watcher'
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