tkh_authentication 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +12 -0
- data/app/mailers/user_mailer.rb +2 -10
- data/app/views/password_resets/new.html.erb +2 -2
- data/app/views/shared/_embedded_login_module.html.erb +2 -2
- data/app/views/shared/_login_info.html.erb +2 -2
- data/app/views/shared/_login_info_for_navbar.html.erb +6 -0
- data/app/views/shared/_login_info_for_sidebar.html.erb +9 -6
- data/app/views/users/index.html.erb +2 -2
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/de.yml +18 -6
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/en.yml +13 -1
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/es.yml +12 -1
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/fr.yml +15 -3
- data/lib/generators/tkh_authentication/create_or_update_locales/templates/it.yml +50 -0
- data/lib/tkh_authentication/version.rb +1 -1
- metadata +6 -4
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
+
## 0.1.5
|
6
|
+
|
7
|
+
* Modified the login info in sidebar partial
|
8
|
+
* Added a login info for navbar partial
|
9
|
+
|
10
|
+
|
11
|
+
## 0.1.4
|
12
|
+
|
13
|
+
* Set up all missing translations
|
14
|
+
* Improved and debugged user mailer
|
15
|
+
|
16
|
+
|
5
17
|
## 0.1.3
|
6
18
|
|
7
19
|
* Added login module partial to embed in pages and set it up with bootstrap tabs
|
data/app/mailers/user_mailer.rb
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
class UserMailer < ActionMailer::Base
|
2
2
|
|
3
|
-
|
4
|
-
default :from => SETTINGS['site_admin_email']
|
5
|
-
else
|
6
|
-
default :from => 'test@example.com'
|
7
|
-
end
|
3
|
+
default :from => Setting.first.try(:contact_email) ? Setting.first.try(:contact_email) : 'info@tenthousandhours.eu'
|
8
4
|
|
9
5
|
# Subject can be set in your I18n file at config/locales/en.yml
|
10
6
|
# with the following lookup:
|
@@ -13,11 +9,7 @@ class UserMailer < ActionMailer::Base
|
|
13
9
|
#
|
14
10
|
def password_reset(user)
|
15
11
|
@user = user
|
16
|
-
|
17
|
-
mail :to => user.email, :subject => t('authentication.password_reset_email_subject') + ' | ' + SETTINGS['site_name']
|
18
|
-
else
|
19
|
-
mail :to => user.email, :subject => t('authentication.password_reset_email_subject')
|
20
|
-
end
|
12
|
+
mail :to => user.email, :subject => t('authentication.password_reset_email_subject') + ' | ' + Setting.first.try(:site_name)
|
21
13
|
end
|
22
14
|
|
23
15
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<h1
|
1
|
+
<h1><%= t('authentication.password.request.a_new_one') %></h1>
|
2
2
|
|
3
|
-
<p
|
3
|
+
<p><%= t('authentication.password.request.explanation') %></p>
|
4
4
|
|
5
5
|
<%= form_tag password_resets_path, :method => :post do %>
|
6
6
|
<div class="field">
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<ul class="nav nav-tabs" id="loginTab">
|
2
|
-
<li class="active"><a href="#login-tab" data-toggle="tab"
|
3
|
-
<li><a href="#signup-tab" data-toggle="tab"
|
2
|
+
<li class="active"><a href="#login-tab" data-toggle="tab"><%= t('authentication.login_now') %></a></li>
|
3
|
+
<li><a href="#signup-tab" data-toggle="tab"><%= t('authentication.create_account') %></a></li>
|
4
4
|
</ul>
|
5
5
|
|
6
6
|
<div class="tab-content">
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<p class="login-info">
|
2
2
|
<% if current_user %>
|
3
|
-
<strong><%= current_user.email %></strong> <%= link_to
|
3
|
+
<strong><%= current_user.email %></strong> <%= link_to t('authentication.logout'), logout_path, class: 'btn btn-mini' %>
|
4
4
|
<% else %>
|
5
|
-
<%= link_to
|
5
|
+
<%= link_to t('authentication.login_now'), login_path, class: 'btn btn-mini' %> or <%= link_to "Sign Up", signup_path, class: 'btn btn-mini' %>
|
6
6
|
<% end %>
|
7
7
|
</p>
|
@@ -1,9 +1,12 @@
|
|
1
1
|
<% if current_user %>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
2
|
+
<div class="btn-group">
|
3
|
+
<br />
|
4
|
+
<a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#"><%= current_user.email %> <span class="caret"></span></a>
|
5
|
+
<ul class="dropdown-menu">
|
6
|
+
<%= content_tag :li, link_to(t('logout'), logout_path) %>
|
7
|
+
</ul>
|
8
|
+
</div>
|
5
9
|
<% else %>
|
6
|
-
<
|
7
|
-
<p><%= link_to t('authentication.login_now'), login_path %> or <%= link_to t('authentication.create_account'), signup_path %>
|
8
|
-
</p>
|
10
|
+
<p><br /><%= link_to t('authentication.login_now'), login_path, class: 'btn' %></p>
|
9
11
|
<% end %>
|
12
|
+
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<h1
|
1
|
+
<h1><%= t('activerecord.models.users') %></h1>
|
2
2
|
|
3
3
|
<table class='table table-striped'>
|
4
4
|
<thead>
|
5
5
|
<tr>
|
6
6
|
<th><%= t 'authentication.name' %></th>
|
7
7
|
<th><%= t 'activerecord.attributes.user.email' %></th>
|
8
|
-
<th
|
8
|
+
<th><%= t('question_mark_inverted') %><%= t('activerecord.attributes.user.admin') %><%= t('question_mark') %></th>
|
9
9
|
</tr>
|
10
10
|
</thead>
|
11
11
|
|
@@ -1,8 +1,13 @@
|
|
1
1
|
de:
|
2
2
|
|
3
3
|
activerecord:
|
4
|
+
models:
|
5
|
+
user: 'Benutzer'
|
6
|
+
users: 'Benutzer'
|
7
|
+
|
4
8
|
attributes:
|
5
9
|
user:
|
10
|
+
admin: 'Administrator'
|
6
11
|
first_name: "Vorname"
|
7
12
|
last_name: "Nachname"
|
8
13
|
email: "Email"
|
@@ -10,9 +15,9 @@ de:
|
|
10
15
|
password_confirmation: 'Kennwort bestätigen'
|
11
16
|
|
12
17
|
authentication:
|
13
|
-
admin_disabled_confirmation: '
|
18
|
+
admin_disabled_confirmation: 'Du hast diesem Nutzer die Administrator-Rechte entzogen'
|
14
19
|
admin_enabled_confirmation: 'Du hast diesem Nutzer Administrator-Rechte gegeben'
|
15
|
-
create_account: '
|
20
|
+
create_account: 'Nutzerkonto erstellen'
|
16
21
|
disable_admin: 'löschen'
|
17
22
|
enable_admin: 'erstellen'
|
18
23
|
forgot_password: "Kennwort vergessen?"
|
@@ -22,17 +27,24 @@ de:
|
|
22
27
|
logout_confirmation: "Du hast dich abgemeldet!"
|
23
28
|
name: 'Name'
|
24
29
|
not_registered: "Hast Du schon ein Nutzerkonto?"
|
30
|
+
password:
|
31
|
+
request:
|
32
|
+
a_new_one: 'Neues Kennwort anfordern'
|
33
|
+
explanation: "Hast du dein Kennwort vergessen oder willst dein Kennwort ändern, bitte gib uns deine Email-Adresse. an. Wir werden dir eine Email mit detaillierter Anleitung zusenden."
|
25
34
|
password_reset_confirmation: "Dein Kennwort wurde erfolgreich zurückgesetzt!"
|
26
35
|
password_reset_email_subject: "Kennwort zurücksetzen"
|
27
|
-
remember_me: "
|
36
|
+
remember_me: "Benutzer merken"
|
28
37
|
reset_instructions: "Um das Kennwort zurückzusetzen, klicke auf folgenden Link: %{reset_url} \n\nIf hast Du das Zurücksetzen des Kennworts nicht angefordert, dann ignoriere bitte diese Email. Dein Kennwort bleibt unverändert."
|
29
38
|
reset_password_email_sent_confirmation: "Wir haben Dir einen Link zum Zurücksetzen Deines Kennworts geschickt."
|
30
39
|
reset_your_password: "Kennwort zurücksetzen"
|
31
40
|
signup_confirmation: "Dein Nutzerkonto wurde erstellt und Du bist eingeloggt!"
|
41
|
+
status:
|
42
|
+
logged_in: 'Du bist angemeldet als'
|
43
|
+
not_logged_in: 'Du bist nicht angemeldet'
|
32
44
|
update_password: "Aktualisiere Dein Kennwort"
|
33
45
|
warning:
|
34
46
|
email_or_password_invalid: "Email oder Kennwort ungültig"
|
35
|
-
login_needed: "Du
|
47
|
+
login_needed: "Du musst dich einloggen um auf diese Seite zuzugreifen. Du wurdest zum Login umgeleitet."
|
36
48
|
no_such_email: "Es gibt kein Nutzerkonto mit dieser Email-Adresse."
|
37
|
-
password_reset_expired: "Das Zurücksetzen des Kennworts ist abgelaufen. Dies war für 24 Stunden möglich"
|
38
|
-
restricted_access: "Diese Sektion ist nur für Administratoren zugänglich. Kontaktiere den Inhaber der Webseite, wenn
|
49
|
+
password_reset_expired: "Das Zurücksetzen des Kennworts ist abgelaufen. Dies war nur für 24 Stunden möglich"
|
50
|
+
restricted_access: "Diese Sektion ist nur für Administratoren zugänglich. Kontaktiere den Inhaber der Webseite, wenn du Administrator-Rechte erhalten möchtest."
|
@@ -1,8 +1,13 @@
|
|
1
1
|
en:
|
2
2
|
|
3
|
-
activerecord:
|
3
|
+
activerecord:
|
4
|
+
models:
|
5
|
+
user: 'user'
|
6
|
+
users: 'users'
|
7
|
+
|
4
8
|
attributes:
|
5
9
|
user:
|
10
|
+
admin: 'admin' # admin is short for administrator. put full word if necessary
|
6
11
|
first_name: "first name"
|
7
12
|
last_name: "last name"
|
8
13
|
email: "email"
|
@@ -22,6 +27,10 @@ en:
|
|
22
27
|
logout_confirmation: "You have been logged out!"
|
23
28
|
name: 'name'
|
24
29
|
not_registered: "you don't have an account yet?"
|
30
|
+
password:
|
31
|
+
request:
|
32
|
+
a_new_one: 'Request a new Password'
|
33
|
+
explanation: "Whether you forgot your password or you just want to change it, please give us your email address. We will send you an email with instructions on how to complete the two-click, 30 second process."
|
25
34
|
password_reset_confirmation: "Your password has been successfully reset!"
|
26
35
|
password_reset_email_subject: "Password reset"
|
27
36
|
remember_me: "stay logged in"
|
@@ -29,6 +38,9 @@ en:
|
|
29
38
|
reset_password_email_sent_confirmation: "We have emailed you a link to reset your password."
|
30
39
|
reset_your_password: "Reset Password"
|
31
40
|
signup_confirmation: "Your account has been created and you have been logged in!"
|
41
|
+
status:
|
42
|
+
logged_in: 'You are logged in as'
|
43
|
+
not_logged_in: 'You are not logged in'
|
32
44
|
update_password: "Update Password"
|
33
45
|
warning:
|
34
46
|
email_or_password_invalid: "Email or password is invalid"
|
@@ -1,6 +1,10 @@
|
|
1
1
|
es:
|
2
2
|
|
3
|
-
activerecord:
|
3
|
+
activerecord:
|
4
|
+
models:
|
5
|
+
user: 'user'
|
6
|
+
users: 'users'
|
7
|
+
|
4
8
|
attributes:
|
5
9
|
user:
|
6
10
|
first_name: "nombre de pila"
|
@@ -22,6 +26,10 @@ es:
|
|
22
26
|
logout_confirmation: 'Se ha cerrado la sesión'
|
23
27
|
name: 'nombre'
|
24
28
|
not_registered: 'no tienes una cuenta todavía'
|
29
|
+
password:
|
30
|
+
request:
|
31
|
+
a_new_one: 'Request a new Password'
|
32
|
+
explanation: "Whether you forgot your password or you just want to change it, please give us your email address. We will send you an email with instructions on how to complete the two-click, 30 second process."
|
25
33
|
password_reset_confirmation: 'Tu contraseña se ha restablecido correctamente.'
|
26
34
|
password_reset_email_subject: 'Restablecimiento de contraseña.'
|
27
35
|
remember_me: "recordar en este equipo"
|
@@ -29,6 +37,9 @@ es:
|
|
29
37
|
reset_password_email_sent_confirmation: 'Te hemos enviado un enlace para reestablecer tu contraseña.'
|
30
38
|
reset_your_password: 'Restablece tu contraseña.'
|
31
39
|
signup_confirmation: 'Hemos creado tu cuenta y ya estas conectado.'
|
40
|
+
status:
|
41
|
+
logged_in: 'You are logged in as'
|
42
|
+
not_logged_in: 'You are not logged in'
|
32
43
|
update_password: 'Actualiza tu contraseña.'
|
33
44
|
warning:
|
34
45
|
email_or_password_invalid: 'Correo electrónico o contraseña no válidos'
|
@@ -1,8 +1,13 @@
|
|
1
1
|
fr:
|
2
2
|
|
3
|
-
activerecord:
|
3
|
+
activerecord:
|
4
|
+
models:
|
5
|
+
user: 'utilisateur'
|
6
|
+
users: 'les utilisateurs'
|
7
|
+
|
4
8
|
attributes:
|
5
9
|
user:
|
10
|
+
admin: 'administrateur' # admin is short for administrator. put full word if necessary
|
6
11
|
first_name: "prénom"
|
7
12
|
last_name: "nom de famille"
|
8
13
|
email: "courriel"
|
@@ -17,17 +22,24 @@ fr:
|
|
17
22
|
enable_admin: 'donner le pouvoir'
|
18
23
|
forgot_password: "avez vous oublié votre mot de passe ?"
|
19
24
|
login_confirmation: "Merci de vous être identifié !"
|
20
|
-
login_now: "
|
25
|
+
login_now: "identifiez-vous"
|
21
26
|
logout: "déconnexion"
|
22
27
|
logout_confirmation: "Merci pour votre visite."
|
23
28
|
name: 'nom'
|
24
29
|
not_registered: "vous n'avez pas encore de compte ?"
|
30
|
+
password:
|
31
|
+
request:
|
32
|
+
a_new_one: 'Demander un nouveau mot de passe'
|
33
|
+
explanation: "Que vous ayez oublié votre mot de passe, ou que vous vouliez juste en changer, veuillez entrer votre adresse courriel. Nous allons vous envoyer un courriel avec les instructions. Ça prendra deux clicks de souris et environ 30 segondes."
|
25
34
|
password_reset_confirmation: "Votre mot de passe a été réinitialisé avec succès !"
|
26
35
|
password_reset_email_subject: "Réinitialisation du mot de passe"
|
27
36
|
remember_me: "gardez la session ouverte" # got this from amazon.fr
|
28
37
|
reset_password_email_sent_confirmation: "Nous vous avons envoyé un lien pour réinitialiser votre mot de passe."
|
29
|
-
reset_your_password: "
|
38
|
+
reset_your_password: "Réinitialiser votre mot de passe"
|
30
39
|
signup_confirmation: "Votre compte a été créé et vous êtes identifié !"
|
40
|
+
status:
|
41
|
+
logged_in: 'Votre identification :'
|
42
|
+
not_logged_in: "Vous n'êtes pas identifié"
|
31
43
|
update_password: "Actualiser le mot de passe"
|
32
44
|
warning:
|
33
45
|
email_or_password_invalid: "La combinaison de l'addresse email et du mot de passe n'est pas correct"
|
@@ -0,0 +1,50 @@
|
|
1
|
+
it:
|
2
|
+
|
3
|
+
activerecord:
|
4
|
+
models:
|
5
|
+
user: 'user'
|
6
|
+
users: 'users'
|
7
|
+
|
8
|
+
attributes:
|
9
|
+
user:
|
10
|
+
first_name: "first name"
|
11
|
+
last_name: "last name"
|
12
|
+
email: "email"
|
13
|
+
password: 'password'
|
14
|
+
password_confirmation: 'password confirmation'
|
15
|
+
|
16
|
+
authentication:
|
17
|
+
admin_disabled_confirmation: 'you have stripped this user of the administrator privileges'
|
18
|
+
admin_enabled_confirmation: 'you have empowered this user to be an administrator'
|
19
|
+
create_account: 'create an account'
|
20
|
+
disable_admin: 'disable'
|
21
|
+
enable_admin: 'enable'
|
22
|
+
forgot_password: "forgot your password?"
|
23
|
+
login_confirmation: "You have been logged in!"
|
24
|
+
login_now: "log in"
|
25
|
+
logout: "log out"
|
26
|
+
logout_confirmation: "You have been logged out!"
|
27
|
+
name: 'name'
|
28
|
+
not_registered: "you don't have an account yet?"
|
29
|
+
password:
|
30
|
+
request:
|
31
|
+
a_new_one: 'Request a new Password'
|
32
|
+
explanation: "Whether you forgot your password or you just want to change it, please give us your email address. We will send you an email with instructions on how to complete the two-click, 30 second process."
|
33
|
+
password_reset_confirmation: "Your password has been successfully reset!"
|
34
|
+
password_reset_email_subject: "Password reset"
|
35
|
+
remember_me: "stay logged in"
|
36
|
+
reset_instructions: "To reset your password, click or visit this link: %{reset_url} \n\nIf you did not request your password to be reset, please ignore this email. Your password will stay as it is."
|
37
|
+
reset_password_email_sent_confirmation: "We have emailed you a link to reset your password."
|
38
|
+
reset_your_password: "Reset Password"
|
39
|
+
signup_confirmation: "Your account has been created and you have been logged in!"
|
40
|
+
status:
|
41
|
+
logged_in: 'You are logged in as'
|
42
|
+
not_logged_in: 'You are not logged in'
|
43
|
+
update_password: "Update Password"
|
44
|
+
warning:
|
45
|
+
email_or_password_invalid: "Email or password is invalid"
|
46
|
+
login_needed: "You must be logged in to access this page. You have been redirected to the login form."
|
47
|
+
no_such_email: "We do not have any accounts with the email you have provided."
|
48
|
+
password_reset_expired: "Password reset has expired. There was a 24 hours grace period"
|
49
|
+
restricted_access: "This section is reserved to the site's administrators. Contact the site owner if you would like access to be granted to you."
|
50
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_authentication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -110,6 +110,7 @@ files:
|
|
110
110
|
- app/views/sessions/new.html.erb
|
111
111
|
- app/views/shared/_embedded_login_module.html.erb
|
112
112
|
- app/views/shared/_login_info.html.erb
|
113
|
+
- app/views/shared/_login_info_for_navbar.html.erb
|
113
114
|
- app/views/shared/_login_info_for_sidebar.html.erb
|
114
115
|
- app/views/user_mailer/password_reset.text.erb
|
115
116
|
- app/views/users/_form.html.erb
|
@@ -121,6 +122,7 @@ files:
|
|
121
122
|
- lib/generators/tkh_authentication/create_or_update_locales/templates/en.yml
|
122
123
|
- lib/generators/tkh_authentication/create_or_update_locales/templates/es.yml
|
123
124
|
- lib/generators/tkh_authentication/create_or_update_locales/templates/fr.yml
|
125
|
+
- lib/generators/tkh_authentication/create_or_update_locales/templates/it.yml
|
124
126
|
- lib/generators/tkh_authentication/create_or_update_migrations/create_or_update_migrations_generator.rb
|
125
127
|
- lib/generators/tkh_authentication/create_or_update_migrations/templates/create_users.rb
|
126
128
|
- lib/tasks/tkh_authentication_tasks.rake
|
@@ -176,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
178
|
version: '0'
|
177
179
|
segments:
|
178
180
|
- 0
|
179
|
-
hash: -
|
181
|
+
hash: -1539702950156840883
|
180
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
183
|
none: false
|
182
184
|
requirements:
|
@@ -185,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
187
|
version: '0'
|
186
188
|
segments:
|
187
189
|
- 0
|
188
|
-
hash: -
|
190
|
+
hash: -1539702950156840883
|
189
191
|
requirements: []
|
190
192
|
rubyforge_project:
|
191
193
|
rubygems_version: 1.8.23
|