Module: SlackRubyBotAuthorization

Includes:
Authorization
Defined in:
lib/slack_ruby_bot_authorization.rb,
lib/slack_ruby_bot_authorization/role.rb,
lib/slack_ruby_bot_authorization/roles.rb,
lib/slack_ruby_bot_authorization/utils.rb,
lib/slack_ruby_bot_authorization/command.rb,
lib/slack_ruby_bot_authorization/version.rb,
lib/slack_ruby_bot_authorization/commands.rb,
lib/slack_ruby_bot_authorization/exceptions.rb,
lib/slack_ruby_bot_authorization/authorization.rb,
lib/slack_ruby_bot_authorization/command_audit.rb

Overview

Commands stores a list of all commands along with

  1. A defaut denial handler if no command can be matched.

  2. Each command tracks its own denial handler so we can allow for specific behavior when a command request is denied.

Defined Under Namespace

Modules: Authorization, Utils Classes: ArrayArgumentException, Command, CommandAudit, Commands, DenialProcArityException, NullRole, Role, Roles, UnknownBuiltinCommandException, UnknownRoleException

Constant Summary collapse

BUILTIN_COMMANDS =
%w[about help hi].freeze
DefaultRole =
NullRole.new('default')
DefaultCommand =
Command.new('default-not-a-command')
VERSION =
'0.9.0'.freeze

Constants included from Utils

Utils::EmptyDenialProc

Class Method Summary collapse

Methods included from Authorization

#final_permission?, #permitted?, #process_denial, #reset!

Methods included from Utils

#extract_command, #extract_details, #extract_user, #normalize_string

Class Method Details

.extended(othermod) ⇒ Object



21
22
23
# File 'lib/slack_ruby_bot_authorization.rb', line 21

def self.extended(othermod)
  othermod.reset!
end