Added the ability to reset its own RSS access key on "My account".

git-svn-id: http://redmine.rubyforge.org/svn/trunk@677 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-08-29 20:07:28 +00:00
parent 317b460d96
commit 39c9874a41
14 changed files with 66 additions and 17 deletions

View File

@ -52,10 +52,9 @@ class MyController < ApplicationController
@pref = @user.pref
@user.attributes = params[:user]
@user.pref.attributes = params[:pref]
if request.post? and @user.save and @user.pref.save
set_localization
flash.now[:notice] = l(:notice_account_updated)
self.logged_in_user.reload
if request.post? && @user.save && @user.pref.save
flash[:notice] = l(:notice_account_updated)
redirect_to :action => 'account'
end
end
@ -76,6 +75,15 @@ class MyController < ApplicationController
end
redirect_to :action => 'account'
end
# Create a new feeds key
def reset_rss_key
if request.post? && User.current.rss_token
User.current.rss_token.destroy
flash[:notice] = l(:notice_feeds_access_key_reseted)
end
redirect_to :action => 'account'
end
# User's page layout configuration
def page_layout

View File

@ -1,7 +1,12 @@
<h2><%=l(:label_my_account)%></h2>
<p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
<p><%=l(:field_login)%>: <strong><%= @user.login %></strong>
<br /><%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>
<% if @user.rss_token %>
<br /><%= l(:label_feeds_access_key_created_on, distance_of_time_in_words(Time.now, @user.rss_token.created_on)) %>
(<%= link_to l(:button_reset), {:action => 'reset_rss_key'}, :method => :post %>)
<% end %>
</p>
<%= error_messages_for 'user' %>

View File

@ -70,7 +70,8 @@ notice_locking_conflict: Друг потребител променя тези
notice_scm_error: Несъществуващ обект в склада.
notice_not_authorized: Нямате право на достъп до тази страница.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Вашата парола
mail_subject_register: Активация на акаунт
@ -411,6 +412,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Вход
button_submit: Изпращане
@ -442,6 +444,7 @@ button_unwatch: Спри наблюдението
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: активен
status_registered: регистриран

View File

@ -70,7 +70,8 @@ notice_locking_conflict: Datum wurde von einem anderen Benutzer geändert.
notice_scm_error: Eintrag und/oder Revision besteht nicht im Projektarchiv.
notice_not_authorized: Sie sind nicht berechtigt auf diese Seite zuzugreifen.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Ihr redMine Kennwort
mail_subject_register: redMine Kontoaktivierung
@ -411,6 +412,7 @@ label_date_to: Bis
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Einloggen
button_submit: OK
@ -442,6 +444,7 @@ button_unwatch: Unwatch
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: aktiv
status_registered: angemeldet

View File

@ -70,7 +70,8 @@ notice_locking_conflict: Data have been updated by another user.
notice_scm_error: Entry and/or revision doesn't exist in the repository.
notice_not_authorized: You are not authorized to access this page.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Your redMine password
mail_subject_register: redMine account activation
@ -411,6 +412,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Login
button_submit: Submit
@ -442,6 +444,7 @@ button_unwatch: Unwatch
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: active
status_registered: registered

View File

@ -70,7 +70,8 @@ notice_locking_conflict: Data have been updated by another user.
notice_scm_error: La entrada y/o la revisión no existe en el depósito.
notice_not_authorized: You are not authorized to access this page.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Tu contraseña del redMine
mail_subject_register: Activación de la cuenta del redMine
@ -411,6 +412,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Conexión
button_submit: Someter
@ -442,6 +444,7 @@ button_unwatch: Unwatch
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: active
status_registered: registered

View File

@ -71,6 +71,7 @@ notice_scm_error: "L'entrée et/ou la révision demandée n'existe pas dans le d
notice_not_authorized: "Vous n'êtes pas autorisés à accéder à cette page."
notice_email_sent: "Un email a été envoyé à %s"
notice_email_error: "Erreur lors de l'envoi de l'email (%s)"
notice_feeds_access_key_reseted: Votre clé d'accès aux flux RSS a été réinitialisée.
mail_subject_lost_password: Votre mot de passe redMine
mail_subject_register: Activation de votre compte redMine
@ -411,6 +412,7 @@ label_date_to: Au
label_language_based: Basé sur la langue
label_sort_by: Trier par "%s"
label_send_test_email: Envoyer un email de test
label_feeds_access_key_created_on: Clé d'accès RSS créée il y a %s
button_login: Connexion
button_submit: Soumettre
@ -442,6 +444,7 @@ button_unwatch: Ne plus surveiller
button_reply: Répondre
button_archive: Archiver
button_unarchive: Désarchiver
button_reset: Réinitialiser
status_active: actif
status_registered: enregistré

View File

@ -70,7 +70,8 @@ notice_locking_conflict: Le informazioni sono state modificate da un altro utent
notice_scm_error: La risorsa e/o la versione non esistono nel repository.
notice_not_authorized: You are not authorized to access this page.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Password redMine
mail_subject_register: Attivazione utenza redMine
@ -411,6 +412,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Login
button_submit: Invia
@ -442,6 +444,7 @@ button_unwatch: Unwatch
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: attivo
status_registered: registrato

View File

@ -71,7 +71,8 @@ notice_locking_conflict: 別のユーザがデータを更新しています。
notice_scm_error: リポジトリに、エントリ/リビジョンが存在しません。
notice_not_authorized: このページにアクセスするには認証が必要です。
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: redMineパスワード
mail_subject_register: redMineアカウントが有効になりました
@ -412,6 +413,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: ログイン
button_submit: 変更
@ -443,6 +445,7 @@ button_unwatch: ウォッチをやめる
button_reply: 返答
button_archive: 書庫に保存
button_unarchive: 書庫から戻す
button_reset: Reset
status_active: 有効
status_registered: 登録

View File

@ -70,7 +70,8 @@ notice_locking_conflict: De gegevens zijn gewijzigd door een andere gebruiker.
notice_scm_error: Deze ingang of revisie bestaat niet in de repository.
notice_not_authorized: Het is U niet toegestaan om deze pagina te raadplegen.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Uw redMine wachtwoord
mail_subject_register: redMine account activatie
@ -411,6 +412,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Inloggen
button_submit: Toevoegen
@ -442,6 +444,7 @@ button_unwatch: Niet meer monitoren
button_reply: Antwoord
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: Actief
status_registered: geregistreerd

View File

@ -70,7 +70,8 @@ notice_locking_conflict: Os dados foram atualizados por um outro usuario.
notice_scm_error: A entrada e/ou a revisao nao existem no repositorio.
notice_not_authorized: You are not authorized to access this page.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Sua senha do redMine.
mail_subject_register: Ativacao de conta do redMine.
@ -411,6 +412,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Login
button_submit: Enviar
@ -442,6 +444,7 @@ button_unwatch: Unwatch
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: ativo
status_registered: registrado

View File

@ -70,7 +70,8 @@ notice_locking_conflict: Os dados foram atualizados por um outro usuário.
notice_scm_error: A entrada e/ou a revisão não existem no repositório.
notice_not_authorized: Você não está autorizado a acessar esta página.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Sua senha do redMine.
mail_subject_register: Ativação de conta do redMine.
@ -411,6 +412,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Login
button_submit: Enviar
@ -442,6 +444,7 @@ button_unwatch: Não observar
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: ativo
status_registered: registrado

View File

@ -70,7 +70,8 @@ notice_locking_conflict: Data har uppdaterats av en annan användare.
notice_scm_error: Inlägg och/eller revision finns inte i repositoriet.
notice_not_authorized: You are not authorized to access this page.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: Ditt redMine lösenord
mail_subject_register: redMine kontoaktivering
@ -411,6 +412,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: Logga in
button_submit: Skicka
@ -442,6 +444,7 @@ button_unwatch: Unwatch
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: activ
status_registered: registrerad

View File

@ -73,7 +73,8 @@ notice_locking_conflict: 数据已被另一个用户更新
notice_scm_error: 在版本库中不存在该条目或修订
notice_not_authorized: You are not authorized to access this page.
notice_email_sent: An email was sent to %s
notice_email_error: An error occurred while sending mail (%s)"
notice_email_error: An error occurred while sending mail (%s)
notice_feeds_access_key_reseted: Your RSS access key was reseted.
mail_subject_lost_password: 您的redMine口令
mail_subject_register: redMine帐户激活
@ -413,6 +414,7 @@ label_date_to: To
label_language_based: Language based
label_sort_by: Sort by "%s"
label_send_test_email: Send a test email
label_feeds_access_key_created_on: RSS access key created %s ago
button_login: 登录
button_submit: 提交
@ -444,6 +446,7 @@ button_unwatch: Unwatch
button_reply: Reply
button_archive: Archive
button_unarchive: Unarchive
button_reset: Reset
status_active: 激活
status_registered: 已注册