module Api
  class BaseController < ActionController::Base
    Mumukit::Login.configure_controller! self

    protect_from_forgery with: :null_session

    include OnBaseOrganizationOnly
    include WithApiErrors
    include WithAuthorization

    before_action :verify_api_client!

    private

    def verify_api_client!
      ApiClient.verify_token! Mumukit::Auth::Token.extract_from_header(request.env['HTTP_AUTHORIZATION'])
    end
  end
end

module Api
  class BaseController < ActionController::Base
    Mumukit::Login.configure_controller! self

    protect_from_forgery with: :null_session

    include WithApiErrors
    include WithAuthorization
    include Mumuki::Laboratory::Controllers::CurrentOrganization

    before_action :set_current_organization!

    include OnBaseOrganizationOnly

    before_action :verify_api_client!

    private

    def verify_api_client!
      ApiClient.verify_token! Mumukit::Auth::Token.extract_from_header(request.env['HTTP_AUTHORIZATION'])
    end
  end
end

Select organization on base controller as well
Select organization on base controller as well
