Sha256: 0b4bf20ed2cd6827f6eb2cad6ca70ae9a675df605956729033baed410fb61a57
Contents?: true
Size: 895 Bytes
Versions: 20
Compression:
Stored size: 895 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.get('block_user', args[@auth_keys_idx]) 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
20 entries across 20 versions & 1 rubygems