Sha256: 43c206d8a9d78bd9b54316c61a836b6c5157f4836106e75c811c7b244c2bfafe

Contents?: true

Size: 824 Bytes

Versions: 27

Compression:

Stored size: 824 Bytes

Contents

module OpenStax
  module Accounts
    module Dev
      class AccountsController < OpenStax::Accounts::Dev::BaseController
        # Allow accessing from inside an iframe
        before_filter :allow_iframe_access, only: [:index, :search]

        def index
        end

        def search
          handle_with(AccountsSearch)
        end

        def create
          handle_with(AccountsCreate,
                      complete: lambda { redirect_to dev_accounts_path })
        end

        def become
          @account = Account.find_by(openstax_uid: params[:id])
          sign_in(@account)
          redirect_back key: :accounts_return_to, strategies: [:session]
        end

        private

        def allow_iframe_access
          response.headers.except! 'X-Frame-Options'
        end

      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
openstax_accounts-7.13.1 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.13.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.12.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.11.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.10.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.9.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.8.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.7.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.6.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.5.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.4.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.3.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.2.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.1.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.0.1 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-7.0.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-6.4.2 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-6.4.1 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-6.4.0 app/controllers/openstax/accounts/dev/accounts_controller.rb
openstax_accounts-6.3.2 app/controllers/openstax/accounts/dev/accounts_controller.rb