diff --git a/app/controllers/admin/users_new_interface_controller.rb b/app/controllers/admin/users_new_interface_controller.rb index e4c956b62..8190f5df6 100644 --- a/app/controllers/admin/users_new_interface_controller.rb +++ b/app/controllers/admin/users_new_interface_controller.rb @@ -4,7 +4,6 @@ class Admin::UsersNewInterfaceController < OrbitMemberController helper OrbitBackendHelper before_filter :set_attribute,:except => [:index,:show] - open_for_user :only => [:setting_account, :edit_user_data, :update] open_for_visitor :only => [:index, :show] def index @@ -183,36 +182,6 @@ class Admin::UsersNewInterfaceController < OrbitMemberController # @disable_all_field = false @user = User.find(params[:users_new_interface_id]) end - - def edit_user_data - - if params[:users_new_interface_id].blank? - redirect_to :action => :index - else - @user = User.find(params[:users_new_interface_id]) - - if current_user.id != @user.id - redirect_to :action => :index - end - - @form_index = 0 - get_info_and_roles - end - - end - - def setting_account - - if params[:users_new_interface_id].blank? - redirect_to :action => :index - else - @user = User.find(params[:users_new_interface_id]) - if current_user.id != @user.id - redirect_to :action => :index - end - end - - end def update @@ -234,37 +203,6 @@ class Admin::UsersNewInterfaceController < OrbitMemberController render :action => :edit_passwd, :notice => flash.now[:error] end - elsif params[:edit_type] == 'edit_user_data' - - if current_user.id != @user.id - redirect_to :action => :index - end - - @user.update_attributes(params[:user]) - - attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values' - - attribute_values = params[:user].delete(attribute_values_key) - @user.save - - redirect_to :action => :show - - elsif params[:edit_type] == 'setting_account' - - if current_user.id != @user.id - redirect_to :action => :index - end - - if !@user.valid_password?(params[:old_password]) - flash.now[:error] = t("users.valid_old_password") - end - - if !flash.now[:error] && @user.update_attributes(params[:user]) - redirect_to :action => :show - else - render :action => :setting_account, :notice => flash.now[:error] - end - else @user.update_attributes(params[:user]) diff --git a/app/views/admin/users_new_interface/_form_user_data.html.erb b/app/views/admin/users_new_interface/_form_user_data.html.erb deleted file mode 100644 index ecbf6df7b..000000000 --- a/app/views/admin/users_new_interface/_form_user_data.html.erb +++ /dev/null @@ -1,81 +0,0 @@ - - -<%= render :partial=>"infos"%> - -