Sha256: b0d18a248890b866bd821c4b105ecf81c5a5d01594dd343900a1e366987a71fd

Contents?: true

Size: 1.25 KB

Versions: 9

Compression:

Stored size: 1.25 KB

Contents

class Spree::UserRegistrationsController < Devise::RegistrationsController
  include Spree::Core::ControllerHelpers
  helper 'spree/users', 'spree/base'

  ssl_required
  after_filter :associate_user, :only => :create
  before_filter :check_permissions, :only => [:edit, :update]
  skip_before_filter :require_no_authentication

  # GET /resource/sign_up
  def new
    super
  end

  # POST /resource/sign_up
  def create
    @user = build_resource(params[:user])
    if resource.save
      set_flash_message(:notice, :signed_up)
      sign_in(:user, @user)
      fire_event('spree.user.signup', :user => @user, :order => current_order(true))
      sign_in_and_redirect(:user, @user)
    else
      clean_up_passwords(resource)
      render :new
    end
  end

  # GET /resource/edit
  def edit
    super
  end

  # PUT /resource
  def update
    super
  end

  # DELETE /resource
  def destroy
    super
  end

  # GET /resource/cancel
  # Forces the session data which is usually expired after sign
  # in to be expired now. This is useful if the user wants to
  # cancel oauth signing in/up in the middle of the process,
  # removing all OAuth session data.
  def cancel
    super
  end

  protected
    def check_permissions
      authorize!(:create, resource)
    end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree_auth-1.1.5 app/controllers/spree/user_registrations_controller.rb
spree_auth-1.1.4 app/controllers/spree/user_registrations_controller.rb
spree_auth-1.1.3 app/controllers/spree/user_registrations_controller.rb
spree_auth-1.1.2 app/controllers/spree/user_registrations_controller.rb
spree_auth-1.1.2.rc1 app/controllers/spree/user_registrations_controller.rb
spree_auth-1.1.1 app/controllers/spree/user_registrations_controller.rb
spree_auth-1.1.0 app/controllers/spree/user_registrations_controller.rb
spree_auth-1.1.0.rc2 app/controllers/spree/user_registrations_controller.rb
spree_auth-1.1.0.rc1 app/controllers/spree/user_registrations_controller.rb