Compare commits

..

1 Commits
1.4.1 ... 1.4.0

Author SHA1 Message Date
Jean-Philippe Lang
7578e485a5 tagged version 1.4.0
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/tags/1.4.0@9416 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-14 08:20:21 +00:00
68 changed files with 33 additions and 516 deletions

View File

@@ -75,10 +75,9 @@ group :test do
gem "mocha"
end
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
if File.exists?('Gemfile.local')
puts "Loading Gemfile.local ..." if $DEBUG # `ruby -d` or `bundle -v`
instance_eval File.read(local_gemfile)
instance_eval File.read('Gemfile.local')
end
# Load plugins' Gemfiles

View File

@@ -131,6 +131,14 @@ class AccountController < ApplicationController
private
def logout_user
if User.current.logged?
cookies.delete :autologin
Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
self.logged_user = nil
end
end
def authenticate_user
if Setting.openid? && using_open_id?
open_id_authenticate(params[:openid_url])

View File

@@ -126,15 +126,6 @@ class ApplicationController < ActionController::Base
end
end
# Logs out current user
def logout_user
if User.current.logged?
cookies.delete :autologin
Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
self.logged_user = nil
end
end
# check if login is globally required to access the application
def check_if_login_required
# no check needed if user is already logged in

View File

@@ -65,24 +65,6 @@ class MyController < ApplicationController
end
end
# Destroys user's account
def destroy
@user = User.current
unless @user.own_account_deletable?
redirect_to :action => 'account'
return
end
if request.post? && params[:confirm]
@user.destroy
if @user.destroyed?
logout_user
flash[:notice] = l(:notice_account_deleted)
end
redirect_to home_path
end
end
# Manage user's password
def password
@user = User.current

View File

@@ -34,7 +34,7 @@ class Token < ActiveRecord::Base
# Delete all expired tokens
def self.destroy_expired
Token.delete_all ["action NOT IN (?) AND created_on < ?", ['feeds', 'api'], Time.now - @@validity_time]
Token.delete_all ["action <> 'feeds' AND created_on < ?", Time.now - @@validity_time]
end
private

View File

@@ -68,7 +68,7 @@ class User < Principal
MAIL_LENGTH_LIMIT = 60
validates_presence_of :login, :firstname, :lastname, :mail, :if => Proc.new { |user| !user.is_a?(AnonymousUser) }
validates_uniqueness_of :login, :if => Proc.new { |user| user.login_changed? && user.login.present? }, :case_sensitive => false
validates_uniqueness_of :login, :if => Proc.new { |user| !user.login.blank? }, :case_sensitive => false
validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false
# Login must contain lettres, numbers, underscores only
validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i
@@ -284,18 +284,14 @@ class User < Principal
# Return user's RSS key (a 40 chars long string), used to access feeds
def rss_key
if rss_token.nil?
create_rss_token(:action => 'feeds')
end
rss_token.value
token = self.rss_token || Token.create(:user => self, :action => 'feeds')
token.value
end
# Return user's API key (a 40 chars long string), used to access the API
def api_key
if api_token.nil?
create_api_token(:action => 'api')
end
api_token.value
token = self.api_token || self.create_api_token(:action => 'api')
token.value
end
# Return an array of project ids for which the user has explicitly turned mail notifications on
@@ -486,12 +482,6 @@ class User < Principal
allowed_to?(action, nil, options.reverse_merge(:global => true), &block)
end
# Returns true if the user is allowed to delete his own account
def own_account_deletable?
Setting.unsubscribe? &&
(!admin? || User.active.first(:conditions => ["admin = ? AND id <> ?", true, id]).present?)
end
safe_attributes 'login',
'firstname',
'lastname',

View File

@@ -3,9 +3,6 @@
<p><%=l(:field_login)%>: <strong><%= link_to_user(@user, :format => :username) %></strong><br />
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
<% if @user.own_account_deletable? %>
<p><%= link_to(l(:button_delete_my_account), {:action => 'destroy'}, :class => 'icon icon-del') %></p>
<% end %>
<h4><%= l(:label_feeds_access_key) %></h4>

View File

@@ -1,11 +0,0 @@
<h2><%=l(:label_confirmation)%></h2>
<div class="warning">
<p><%= simple_format l(:text_account_destroy_confirmation)%></p>
<p>
<% form_tag({}) do %>
<label><%= check_box_tag 'confirm', 1 %> <%= l(:general_text_Yes) %></label>
<%= submit_tag l(:button_delete_my_account) %> |
<%= link_to l(:button_cancel), :action => 'account' %>
<% end %>
</p>
</div>

View File

@@ -10,8 +10,6 @@
[l(:label_registration_manual_activation), "2"],
[l(:label_registration_automatic_activation), "3"]] %></p>
<p><%= setting_check_box :unsubscribe %></p>
<p><%= setting_text_field :password_min_length, :size => 6 %></p>
<p><%= setting_check_box :lost_password, :label => :label_password_lost %></p>

View File

@@ -12,7 +12,7 @@
<p>
<%= label_tag "period_type_interval", l(:description_date_range_interval), :class => "hidden-for-sighted" %>
<%= radio_button_tag 'period_type', '2', @free_period, :onclick => 'Form.Element.enable("from");Form.Element.enable("to");Form.Element.disable("period");', :id => "period_type_interval" %>
<span onclick="$('period_type_interval').checked = true;Form.Element.enable('from');Form.Element.enable('to');Form.Element.disable('period');">
<span onclick="$('period_type_2').checked = true;">
<%= l(:label_date_from_to,
:start => ((label_tag "from", l(:description_date_from), :class => "hidden-for-sighted") +
text_field_tag('from', @from, :size => 10, :disabled => !@free_period) + calendar_for('from')),

View File

@@ -1025,9 +1025,3 @@ ar:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -174,7 +174,6 @@ bg:
notice_gantt_chart_truncated: Мрежовият график е съкратен, понеже броят на обектите, които могат да бъдат показани е твърде голям (%{max})
notice_issue_successful_create: Задача %{id} е създадена.
notice_issue_update_conflict: Задачата е била променена от друг потребител, докато вие сте я редактирали.
notice_account_deleted: Вашият профил беше премахнат без възможност за възстановяване.
error_can_t_load_default_data: "Грешка при зареждане на примерната информация: %{value}"
error_scm_not_found: Несъществуващ обект в хранилището.
@@ -385,7 +384,6 @@ bg:
setting_issue_group_assignment: Разрешено назначаването на задачи на групи
setting_default_issue_start_date_to_creation_date: Начална дата на новите задачи по подразбиране да бъде днешната дата
setting_commit_cross_project_ref: Отбелязване и приключване на задачи от други проекти, несвързани с конкретното хранилище
setting_unsubscribe: Потребителите могат да премахват профилите си
permission_add_project: Създаване на проект
permission_add_subprojects: Създаване на подпроекти
@@ -897,7 +895,6 @@ bg:
button_show: Показване
button_edit_section: Редактиране на тази секция
button_export: Експорт
button_delete_my_account: Премахване на моя профил
status_active: активен
status_registered: регистриран
@@ -982,7 +979,6 @@ bg:
text_issue_conflict_resolution_overwrite: Прилагане на моите промени (предишните коментари ще бъдат запазени, но някои други промени може да бъдат презаписани)
text_issue_conflict_resolution_add_notes: Добавяне на моите коментари и отхвърляне на другите мои промени
text_issue_conflict_resolution_cancel: Отхвърляне на всички мои промени и презареждане на %{link}
text_account_destroy_confirmation: "Сигурен/на ли сте, че желаете да продължите?\nВашият профил ще бъде премахнат без възможност за възстановяване."
default_role_manager: Мениджър
default_role_developer: Разработчик

View File

@@ -1039,9 +1039,3 @@ bs:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1027,9 +1027,3 @@ ca:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1028,9 +1028,3 @@ cs:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1042,9 +1042,3 @@ da:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -210,7 +210,7 @@ de:
mail_body_lost_password: 'Benutzen Sie den folgenden Link, um Ihr Kennwort zu ändern:'
mail_subject_register: "%{value} Kontoaktivierung"
mail_body_register: 'Um Ihr Konto zu aktivieren, benutzen Sie folgenden Link:'
mail_body_account_information_external: "Sie können sich mit Ihrem Konto %{value} anmelden."
mail_body_account_information_external: "Sie können sich mit Ihrem Konto %{value} an anmelden."
mail_body_account_information: Ihre Konto-Informationen
mail_subject_account_activation_request: "Antrag auf %{value} Kontoaktivierung"
mail_body_account_activation_request: "Ein neuer Benutzer (%{value}) hat sich registriert. Sein Konto wartet auf Ihre Genehmigung:"
@@ -503,7 +503,7 @@ de:
label_last_login: Letzte Anmeldung
label_registered_on: Angemeldet am
label_activity: Aktivität
label_overall_activity: Aktivitäten aller Projekte anzeigen
label_overall_activity: Aktivität aller Projekte anzeigen
label_user_activity: "Aktivität von %{value}"
label_new: Neu
label_logged_as: Angemeldet als
@@ -717,7 +717,7 @@ de:
label_message_new: Neues Thema
label_message_posted: Forenbeitrag hinzugefügt
label_reply_plural: Antworten
label_send_information: Sende Kontoinformationen an Benutzer
label_send_information: Sende Kontoinformationen zum Benutzer
label_year: Jahr
label_month: Monat
label_week: Woche
@@ -992,11 +992,11 @@ de:
text_scm_config: Die SCM-Kommandos können in der in config/configuration.yml konfiguriert werden. Redmine muss anschließend neu gestartet werden.
text_scm_command_not_available: Scm Kommando ist nicht verfügbar. Bitte prüfen Sie die Einstellungen im Administrationspanel.
notice_issue_successful_create: Ticket %{id} erstellt.
label_between: zwischen
setting_issue_group_assignment: Erlaubt die Ticket-Zuweisung an Gruppen
notice_issue_successful_create: Issue %{id} created.
label_between: between
setting_issue_group_assignment: Allow issue assignment to groups
label_diff: diff
text_git_repository_note: Repository steht für sich alleine (bare) und liegt lokal (z.B. /gitrepo, c:\gitrepo)
text_git_repository_note: Repository is bare and local (e.g. /gitrepo, c:\gitrepo)
description_filter: Filter
description_search: Suchfeld
@@ -1045,7 +1045,3 @@ de:
permission_manage_related_issues: Zugehörige Tickets verwalten
field_ldap_filter: LDAP Filter
label_search_for_watchers: Nach hinzufügbaren Beobachtern suchen
notice_account_deleted: Ihr Benutzerkonto wurde unwiderruflich gelöscht.
setting_unsubscribe: Erlaubt Benutzern das eigene Benutzerkonto zu löschen
button_delete_my_account: Mein Benutzerkonto löschen
text_account_destroy_confirmation: Möchten Sie wirklich fortfahren?\nIhr Benutzerkonto wird für immer gelöscht und kann nicht wiederhergestellt werden.

View File

@@ -1025,9 +1025,3 @@ el:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1027,9 +1027,3 @@ en-GB:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -173,7 +173,6 @@ en:
notice_gantt_chart_truncated: "The chart was truncated because it exceeds the maximum number of items that can be displayed (%{max})"
notice_issue_successful_create: "Issue %{id} created."
notice_issue_update_conflict: "The issue has been updated by an other user while you were editing it."
notice_account_deleted: "Your account has been permanently deleted."
error_can_t_load_default_data: "Default configuration could not be loaded: %{value}"
error_scm_not_found: "The entry or revision was not found in the repository."
@@ -384,7 +383,6 @@ en:
setting_issue_group_assignment: Allow issue assignment to groups
setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues
setting_commit_cross_project_ref: Allow issues of all the other projects to be referenced and fixed
setting_unsubscribe: Allow users to unsubscribe
permission_add_project: Create project
permission_add_subprojects: Create subprojects
@@ -896,7 +894,6 @@ en:
button_show: Show
button_edit_section: Edit this section
button_export: Export
button_delete_my_account: Delete my account
status_active: active
status_registered: registered
@@ -981,7 +978,6 @@ en:
text_issue_conflict_resolution_overwrite: "Apply my changes anyway (previous notes will be kept but some changes may be overwritten)"
text_issue_conflict_resolution_add_notes: "Add my notes and discard my other changes"
text_issue_conflict_resolution_cancel: "Discard all my changes and redisplay %{link}"
text_account_destroy_confirmation: "Are you sure you want to proceed?\nYour account will be permanently deleted, with no way to reactivate it."
default_role_manager: Manager
default_role_developer: Developer

View File

@@ -1062,9 +1062,3 @@ es:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1041,9 +1041,3 @@ et:
error_attachment_too_big: "Seda faili ei saa üles laadida, kuna ületab maksimumsuurust (%{max_size})"
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1028,9 +1028,3 @@ eu:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1027,9 +1027,3 @@ fa:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1046,9 +1046,3 @@ fi:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -188,7 +188,6 @@ fr:
notice_gantt_chart_truncated: "Le diagramme a été tronqué car il excède le nombre maximal d'éléments pouvant être affichés (%{max})"
notice_issue_successful_create: "La demande %{id} a été créée."
notice_issue_update_conflict: "La demande a été mise à jour par un autre utilisateur pendant que vous la modifiez."
notice_account_deleted: "Votre compte a été définitivement supprimé."
error_can_t_load_default_data: "Une erreur s'est produite lors du chargement du paramétrage : %{value}"
error_scm_not_found: "L'entrée et/ou la révision demandée n'existe pas dans le dépôt."
@@ -380,7 +379,6 @@ fr:
setting_issue_group_assignment: Permettre l'assignement des demandes aux groupes
setting_default_issue_start_date_to_creation_date: Donner à la date de début d'une nouvelle demande la valeur de la date du jour
setting_commit_cross_project_ref: Permettre le référencement et la résolution des demandes de tous les autres projets
setting_unsubscribe: Permettre aux utilisateurs de se désinscrire
permission_add_project: Créer un projet
permission_add_subprojects: Créer des sous-projets
@@ -870,7 +868,6 @@ fr:
button_show: Afficher
button_edit_section: Modifier cette section
button_export: Exporter
button_delete_my_account: Supprimer mon compte
status_active: actif
status_registered: enregistré
@@ -937,7 +934,6 @@ fr:
text_issue_conflict_resolution_overwrite: "Appliquer quand même ma mise à jour (les notes précédentes seront conservées mais des changements pourront être écrasés)"
text_issue_conflict_resolution_add_notes: "Ajouter mes notes et ignorer mes autres changements"
text_issue_conflict_resolution_cancel: "Annuler ma mise à jour et réafficher %{link}"
text_account_destroy_confirmation: "Êtes-vous sûr de vouloir continuer ?\nVotre compte sera définitivement supprimé, sans aucune possibilité de le réactiver."
default_role_manager: "Manager "
default_role_developer: "Développeur "

View File

@@ -1036,9 +1036,3 @@ gl:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1030,9 +1030,3 @@ he:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1031,9 +1031,3 @@ hr:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1044,9 +1044,3 @@
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1031,9 +1031,3 @@ id:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1026,9 +1026,3 @@ it:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1055,9 +1055,3 @@ ja:
permission_manage_related_issues: 関連するチケットの管理
field_ldap_filter: LDAPフィルタ
label_search_for_watchers: ウォッチャーを検索して追加
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1075,9 +1075,3 @@ ko:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1085,9 +1085,3 @@ lt:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1019,9 +1019,3 @@ lv:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1025,9 +1025,3 @@ mk:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1025,9 +1025,3 @@ mn:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1007,9 +1007,3 @@ nl:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1015,9 +1015,3 @@
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1042,9 +1042,3 @@ pl:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1048,9 +1048,3 @@ pt-BR:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1030,9 +1030,3 @@ pt:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1022,9 +1022,3 @@ ro:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1140,7 +1140,3 @@ ru:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: "Ваша учетная запись полностью удалена"
setting_unsubscribe: "Разрешить пользователям удалять свои учетные записи"
button_delete_my_account: "Удалить мою учетную запись"
text_account_destroy_confirmation: "Ваша учетная запись будет полностью удалена без возможности восстановления.\nВы уверены, что хотите продолжить?"

View File

@@ -1025,9 +1025,3 @@ sk:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1025,9 +1025,3 @@ sl:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1025,9 +1025,3 @@ sr-YU:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1026,9 +1026,3 @@ sr:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1066,9 +1066,3 @@ sv:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1022,9 +1022,3 @@ th:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1044,9 +1044,3 @@ tr:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1022,7 +1022,3 @@ uk:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: "Ваш обліковій запис повністю видалений"
setting_unsubscribe: "Дозволити користувачам видаляти свої облікові записи"
button_delete_my_account: "Видалити мій обліковий запис"
text_account_destroy_confirmation: "Ваш обліковий запис буде повністю видалений без можливості відновлення.\nВи певні, что бажаете продовжити?"

View File

@@ -1076,9 +1076,3 @@ vi:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1105,9 +1105,3 @@
description_date_from: 輸入起始日期
description_date_to: 輸入結束日期
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -1027,9 +1027,3 @@ zh:
permission_manage_related_issues: Manage related issues
field_ldap_filter: LDAP filter
label_search_for_watchers: Search for watchers to add
notice_account_deleted: Your account has been permanently deleted.
setting_unsubscribe: Allow users to unsubscribe
button_delete_my_account: Delete my account
text_account_destroy_confirmation: |-
Are you sure you want to proceed?
Your account will be permanently deleted, with no way to reactivate it.

View File

@@ -78,8 +78,6 @@ ActionController::Routing::Routes.draw do |map|
map.connect 'my/account', :controller => 'my', :action => 'account',
:conditions => {:method => [:get, :post]}
map.connect 'my/account/destroy', :controller => 'my', :action => 'destroy',
:conditions => {:method => [:get, :post]}
map.connect 'my/page', :controller => 'my', :action => 'page',
:conditions => {:method => :get}
# Redirects to my/page

View File

@@ -31,8 +31,6 @@ self_registration:
default: '2'
lost_password:
default: 1
unsubscribe:
default: 1
password_min_length:
format: int
default: 4

View File

@@ -4,17 +4,6 @@ Redmine - project management software
Copyright (C) 2006-2012 Jean-Philippe Lang
http://www.redmine.org/
== 2012-04-20 v1.4.1
* Defect #8574: Time report: date range fields not enabled when using the calendar popup
* Defect #10642: Nested textile ol/ul lists generate invalid HTML
* Defect #10668: RSS key is generated twice when user is not reloaded
* Defect #10669: Token.destroy_expired should not delete API tokens
* Defect #10675: "Submit and continue" is broken
* Defect #10711: User cannot change account details with "Login has already been taken" error
* Feature #10664: Unsubscribe Own User Account
* Patch #10693: German Translation Update
== 2012-04-14 v1.4.0
* Defect #2719: Increase username length limit from 30 to 60

View File

@@ -585,7 +585,7 @@ class RedCloth3 < String
last_line = line_id
end
if line_id - last_line > 1 or line_id == lines.length - 1
while v = depth.pop
depth.delete_if do |v|
lines[last_line] << "</li>\n\t</#{ lT( v ) }l>"
end
end

View File

@@ -4,7 +4,7 @@ module Redmine
module VERSION #:nodoc:
MAJOR = 1
MINOR = 4
TINY = 1
TINY = 0
# Branch values:
# * official release: nil

View File

@@ -521,16 +521,13 @@ function hideOnLoad() {
}
function addFormObserversForDoubleSubmit() {
$$('form[method=post]').each(function(form) {
if (!form.hasClassName('multiple-submit')) {
form.on('submit', function(form_submission) {
if (form.getStorage().get('submitted')) {
form_submission.stop();
} else {
form.getStorage().set('submitted', true);
}
$$('form[method=post]').each(function(el) {
Event.observe(el, 'submit', function(e) {
var form = Event.element(e);
form.select('input[type=submit]').each(function(btn) {
btn.disable();
});
}
});
});
}

View File

@@ -348,7 +348,7 @@ div#issue-changesets div.changeset { padding: 4px;}
div#issue-changesets div.changeset { border-bottom: 1px solid #ddd; }
div#issue-changesets p { margin-top: 0; margin-bottom: 1em;}
.journal ul.details img {margin:0 0 -3px 4px;}
.journal ul.details img {margin:0 0 -3px 4px; vertical-middle:base;}
div#activity dl, #search-results { margin-left: 2em; }
div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }

View File

@@ -84,45 +84,6 @@ class MyControllerTest < ActionController::TestCase
assert user.groups.empty?
end
def test_my_account_should_show_destroy_link
get :account
assert_select 'a[href=/my/account/destroy]'
end
def test_get_destroy_should_display_the_destroy_confirmation
get :destroy
assert_response :success
assert_template 'destroy'
assert_select 'form[action=/my/account/destroy]' do
assert_select 'input[name=confirm]'
end
end
def test_post_destroy_without_confirmation_should_not_destroy_account
assert_no_difference 'User.count' do
post :destroy
end
assert_response :success
assert_template 'destroy'
end
def test_post_destroy_without_confirmation_should_destroy_account
assert_difference 'User.count', -1 do
post :destroy, :confirm => '1'
end
assert_redirected_to '/'
assert_match /deleted/i, flash[:notice]
end
def test_post_destroy_with_unsubscribe_not_allowed_should_not_destroy_account
User.any_instance.stubs(:own_account_deletable?).returns(false)
assert_no_difference 'User.count' do
post :destroy, :confirm => '1'
end
assert_redirected_to '/my/account'
end
def test_change_password
get :password
assert_response :success

View File

@@ -25,12 +25,6 @@ class RoutingMyTest < ActionController::IntegrationTest
{ :controller => 'my', :action => 'account' }
)
end
["get", "post"].each do |method|
assert_routing(
{ :method => method, :path => "/my/account/destroy" },
{ :controller => 'my', :action => 'destroy' }
)
end
assert_routing(
{ :method => 'get', :path => "/my/page" },
{ :controller => 'my', :action => 'page' }

View File

@@ -110,36 +110,6 @@ class Redmine::WikiFormatting::TextileFormatterTest < ActionView::TestCase
)
end
def test_nested_lists
raw = <<-RAW
# Item 1
# Item 2
** Item 2a
** Item 2b
# Item 3
** Item 3a
RAW
expected = <<-EXPECTED
<ol>
<li>Item 1</li>
<li>Item 2
<ul>
<li>Item 2a</li>
<li>Item 2b</li>
</ul>
</li>
<li>Item 3
<ul>
<li>Item 3a</li>
</ul>
</li>
</ol>
EXPECTED
assert_equal expected.gsub(%r{\s+}, ''), to_html(raw).gsub(%r{\s+}, '')
end
def test_escaping
assert_html_output(
'this is a <script>' => 'this is a &lt;script&gt;'

View File

@@ -35,27 +35,4 @@ class TokenTest < ActiveSupport::TestCase
assert !Token.exists?(t1.id)
assert Token.exists?(t2.id)
end
def test_destroy_expired_should_not_destroy_feeds_and_api_tokens
Token.delete_all
Token.create!(:user_id => 1, :action => 'api', :created_on => 7.days.ago)
Token.create!(:user_id => 1, :action => 'feeds', :created_on => 7.days.ago)
assert_no_difference 'Token.count' do
assert_equal 0, Token.destroy_expired
end
end
def test_destroy_expired_should_destroy_expired_tokens
Token.delete_all
Token.create!(:user_id => 1, :action => 'autologin', :created_on => 7.days.ago)
Token.create!(:user_id => 2, :action => 'autologin', :created_on => 3.days.ago)
Token.create!(:user_id => 3, :action => 'autologin', :created_on => 1.hour.ago)
assert_difference 'Token.count', -2 do
assert_equal 2, Token.destroy_expired
end
end
end

View File

@@ -134,20 +134,6 @@ class UserTest < ActiveSupport::TestCase
assert_equal "john", @admin.login
end
def test_update_should_not_fail_for_legacy_user_with_different_case_logins
u1 = User.new(:firstname => "new", :lastname => "user", :mail => "newuser1@somenet.foo")
u1.login = 'newuser1'
assert u1.save
u2 = User.new(:firstname => "new", :lastname => "user", :mail => "newuser2@somenet.foo")
u2.login = 'newuser1'
assert u2.save(false)
user = User.find(u2.id)
user.firstname = "firstname"
assert user.save, "Save failed"
end
def test_destroy_should_delete_members_and_roles
members = Member.find_all_by_user_id(2)
ms = members.size
@@ -599,22 +585,6 @@ class UserTest < ActiveSupport::TestCase
assert_equal key, @jsmith.rss_key
end
def test_rss_key_should_not_be_generated_twice
assert_difference 'Token.count', 1 do
key1 = @jsmith.rss_key
key2 = @jsmith.rss_key
assert_equal key1, key2
end
end
def test_api_key_should_not_be_generated_twice
assert_difference 'Token.count', 1 do
key1 = @jsmith.api_key
key2 = @jsmith.api_key
assert_equal key1, key2
end
end
context "User#api_key" do
should "generate a new one if the user doesn't have one" do
user = User.generate_with_protected!(:api_token => nil)
@@ -800,34 +770,7 @@ class UserTest < ActiveSupport::TestCase
user.auth_source = denied_auth_source
assert !user.change_password_allowed?, "User allowed to change password, though auth source does not"
end
end
def test_own_account_deletable_should_be_true_with_unsubscrive_enabled
with_settings :unsubscribe => '1' do
assert_equal true, User.find(2).own_account_deletable?
end
end
def test_own_account_deletable_should_be_false_with_unsubscrive_disabled
with_settings :unsubscribe => '0' do
assert_equal false, User.find(2).own_account_deletable?
end
end
def test_own_account_deletable_should_be_false_for_a_single_admin
User.delete_all(["admin = ? AND id <> ?", true, 1])
with_settings :unsubscribe => '1' do
assert_equal false, User.find(1).own_account_deletable?
end
end
def test_own_account_deletable_should_be_true_for_an_admin_if_other_admin_exists
User.generate_with_protected(:admin => true)
with_settings :unsubscribe => '1' do
assert_equal true, User.find(1).own_account_deletable?
end
end
context "#allowed_to?" do