Module: Tasker::Concerns::ControllerAuthorizable

Extended by:
ActiveSupport::Concern
Included in:
ApplicationController
Defined in:
lib/tasker/concerns/controller_authorizable.rb

Overview

Controller concern for automatic authorization integration.

This concern provides automatic authorization for Tasker controllers by adding a before_action that checks permissions before each action. It follows the same pattern as the Authenticatable concern.

The concern automatically extracts resource and action names from the controller and action, then delegates to the configured authorization coordinator for the actual authorization check.

Examples:

Basic usage

class TasksController < ApplicationController
  include Tasker::Concerns::Authenticatable
  include Tasker::Concerns::ControllerAuthorizable
end

Skipping authorization for specific actions

class TasksController < ApplicationController
  include Tasker::Concerns::ControllerAuthorizable

  skip_before_action :authorize_tasker_action!, only: [:index]
end