Sha256: 7b722936e23790e16274a7b596e4a78f7e9bd7e46e51812a18cccaf81c0cfae3
Contents?: true
Size: 883 Bytes
Versions: 24
Compression:
Stored size: 883 Bytes
Contents
# Copyright (c) 2018 Sqreen. All Rights Reserved. # Please refer to our terms for more information: https://www.sqreen.io/terms.html require 'sqreen/rule_callback' require 'sqreen/actions' module Sqreen module Rules # Runs the block_user actions (for hooking Sqreen.{identify,auth_user}) class RunBlockUserActions < CB def initialize(klass, method, auth_keys_idx) super(klass, method) @auth_keys_idx = auth_keys_idx end def post(_retval, _inst, args, _budget = nil) actions = actions_repo[Sqreen::Actions::BlockUser] actions.each do |action| res = action.run args[@auth_keys_idx] return res unless res.nil? end nil end private # @return [Sqreen::Actions::Repository] def actions_repo Sqreen::Actions::Repository.instance end end end end
Version data entries
24 entries across 24 versions & 2 rubygems