Sha256: 44e5e98daab33bc10be0effc9040493316ee706a34ba444c16b3f6b1a20905a5
Contents?: true
Size: 586 Bytes
Versions: 9
Compression:
Stored size: 586 Bytes
Contents
require File.expand_path('../../base_controller_decorator', __FILE__) Spree::Admin::UsersController.class_eval do rescue_from Spree::User::DestroyWithOrdersError, :with => :user_destroy_with_orders_error update.after :sign_in_if_change_own_password before_filter :load_roles, :only => [:edit, :new, :update, :create] private def sign_in_if_change_own_password if current_user == @user && @user.password.present? sign_in(@user, :event => :authentication, :bypass => true) end end def load_roles @roles = Spree::Role.scoped end end
Version data entries
9 entries across 9 versions & 1 rubygems