  def rename
    Log.add_info(request, params.inspect)

    @folder = Folder.find(params[:id])

    unless Folder.check_user_auth(@folder.id, @login_user, 'w', true)
      flash[:notice] = 'ERROR:' + t('folder.need_auth_to_modify')
      render(:partial => 'ajax_folder_name', :layout => false)
      return
    end

    unless params[:thetisBoxEdit].nil? or params[:thetisBoxEdit].empty?
      @folder.name = params[:thetisBoxEdit]
      @folder.save
    end
    render(:partial => 'ajax_folder_name', :layout => false)
  end