spree_auth_devise 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of spree_auth_devise might be problematic. Click here for more details.
- data/README.md +3 -1
- data/app/controllers/spree/user_passwords_controller.rb +14 -3
- data/config/initializers/devise.rb +2 -0
- data/config/locales/de.yml +46 -0
- data/config/locales/en.yml +2 -1
- data/config/locales/nl.yml +54 -0
- metadata +8 -7
- data/app/controllers/spree/products_controller_decorator.rb +0 -13
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Spree Auth (Devise)
|
2
2
|
|
3
|
+
[](https://travis-ci.org/spree/spree_auth_devise)
|
4
|
+
|
3
5
|
Provides authentication services for Spree, using the Devise gem.
|
4
6
|
|
5
7
|
## Installation
|
@@ -8,7 +10,7 @@ At one stage in the past, this used to be the auth component for Spree. If that'
|
|
8
10
|
|
9
11
|
Just add this line to your Gemfile:
|
10
12
|
|
11
|
-
gem
|
13
|
+
gem 'spree_auth_devise', :git => 'git://github.com/spree/spree_auth_devise', :branch => '1-2-stable'
|
12
14
|
|
13
15
|
Then run `bundle install`. Authentication will then work exactly as it did in previous versions of Spree.
|
14
16
|
|
@@ -10,13 +10,12 @@ class Spree::UserPasswordsController < Devise::PasswordsController
|
|
10
10
|
|
11
11
|
ssl_required
|
12
12
|
|
13
|
-
#
|
14
|
-
# line:
|
13
|
+
# Overridden due to bug in Devise.
|
15
14
|
# respond_with resource, :location => new_session_path(resource_name)
|
16
15
|
# is generating bad url /session/new.user
|
17
16
|
#
|
18
17
|
# overridden to:
|
19
|
-
# respond_with resource, :location => login_path
|
18
|
+
# respond_with resource, :location => spree.login_path
|
20
19
|
#
|
21
20
|
def create
|
22
21
|
self.resource = resource_class.send_reset_password_instructions(params[resource_name])
|
@@ -29,4 +28,16 @@ class Spree::UserPasswordsController < Devise::PasswordsController
|
|
29
28
|
end
|
30
29
|
end
|
31
30
|
|
31
|
+
# Devise::PasswordsController allows for blank passwords.
|
32
|
+
# Silly Devise::PasswordsController!
|
33
|
+
# Fixes spree/spree#2190.
|
34
|
+
def update
|
35
|
+
if params[:user][:password].blank?
|
36
|
+
set_flash_message(:error, :cannot_be_blank)
|
37
|
+
render :edit
|
38
|
+
else
|
39
|
+
super
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
32
43
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
de:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_found: 'nicht gefunden'
|
5
|
+
already_confirmed: 'wurde berreits bestätigt'
|
6
|
+
not_locked: 'war nicht gesperrt'
|
7
|
+
not_saved:
|
8
|
+
one: '1 Fehler verhindert das Speichern von %{resource}:'
|
9
|
+
other: '%{count} Fehler verhindern das Speichern von %{resource}:'
|
10
|
+
devise:
|
11
|
+
failure:
|
12
|
+
unauthenticated: 'Sie müssen sich anmelden oder registrieren, bevor Sie fortfahren.'
|
13
|
+
unconfirmed: 'Sie müssen Ihre Registrierung bestätigen, bevor Sie fortfahren.'
|
14
|
+
locked: 'Ihr Konto ist gesperrt.'
|
15
|
+
invalid: 'Ungültige E-Mail-Adresse oder Passwort.'
|
16
|
+
invalid_token: 'Ungültiger Authentifizierungsschlüssel.'
|
17
|
+
timeout: 'Ihre Sitzung ist abgelaufen. Bitte melden Sie sich erneut an, um fortzufahren.'
|
18
|
+
inactive: 'Ihr Konto wurde noch nicht aktiviert.'
|
19
|
+
user_passwords:
|
20
|
+
user:
|
21
|
+
send_instructions: 'In ein paar Minuten erhalten Sie eine E-Mail mit Anweisungen um Ihr Passwort zurücksetzen.'
|
22
|
+
updated: 'Ihr Passwort wurde erfolgreich geändert.'
|
23
|
+
confirmations:
|
24
|
+
send_instructions: 'In ein paar Minuten erhalten Sie eine E-Mail mit Anweisungen, um Ihr Konto zu aktivieren.'
|
25
|
+
confirmed: 'Ihr Konto wurde erfolgreich aktiviert.'
|
26
|
+
user_registrations:
|
27
|
+
signed_up: 'Herzlich Willkommen! Sie haben sich erfolgreich registriert.'
|
28
|
+
inactive_signed_up: 'Sie haben sich erfolgreich registriert. Wir konnten Sie jedoch nicht anmelden, da Ihr Konto %{reason} ist.'
|
29
|
+
updated: 'Sie haben Ihr Konto erfolgreich aktualisiert.'
|
30
|
+
destroyed: 'Ihr Konto wurde erfolgreich gelöscht. Auf Wiedersehen!'
|
31
|
+
user_sessions:
|
32
|
+
signed_in: 'Erfolgreich angemeldet.'
|
33
|
+
signed_out: 'Erfolgreich abgemeldet.'
|
34
|
+
unlocks:
|
35
|
+
send_instructions: 'In ein paar Minuten erhalten Sie eine E-Mail mit Anweisungen um Ihr Konto freizuschalten.'
|
36
|
+
unlocked: 'Ihr Konto wurde erfolgreich freigeschaltet.'
|
37
|
+
oauth_callbacks:
|
38
|
+
success: 'Erfolgreich autorisiert durch %{kind} Konto.'
|
39
|
+
failure: 'Autorisierung durch %{kind} fehlgeschlagen aufgrund von "%{reason}".'
|
40
|
+
mailer:
|
41
|
+
confirmation_instructions:
|
42
|
+
subject: 'Bestätigen Sie Ihre Registrierung'
|
43
|
+
reset_password_instructions:
|
44
|
+
subject: 'Passwort zurücksetzen'
|
45
|
+
unlock_instructions:
|
46
|
+
subject: 'Konto freischalten'
|
data/config/locales/en.yml
CHANGED
@@ -18,6 +18,7 @@ en:
|
|
18
18
|
inactive: 'Your account was not activated yet.'
|
19
19
|
user_passwords:
|
20
20
|
user:
|
21
|
+
cannot_be_blank: 'Your password cannot be blank.'
|
21
22
|
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
|
22
23
|
updated: 'Your password was changed successfully. You are now signed in.'
|
23
24
|
confirmations:
|
@@ -43,4 +44,4 @@ en:
|
|
43
44
|
reset_password_instructions:
|
44
45
|
subject: 'Reset password instructions'
|
45
46
|
unlock_instructions:
|
46
|
-
subject: 'Unlock Instructions'
|
47
|
+
subject: 'Unlock Instructions'
|
@@ -0,0 +1,54 @@
|
|
1
|
+
nl:
|
2
|
+
errors:
|
3
|
+
messages:
|
4
|
+
not_found: 'niet gevonden'
|
5
|
+
already_confirmed: 'is al bevestigd'
|
6
|
+
not_locked: 'is niet vergrendeld'
|
7
|
+
not_saved:
|
8
|
+
one: '1 fout tijdens het opslaan van %{resource}'
|
9
|
+
other: '%{count} fouten tijdens het opslaan van %{resource}'
|
10
|
+
complete: 'voltooid'
|
11
|
+
devise:
|
12
|
+
failure:
|
13
|
+
unauthenticated: 'Je moet een account aanmaken voordat je kan verder gaan.'
|
14
|
+
unconfirmed: 'Je moet je account bevestigen voordat je kan verder gaan.'
|
15
|
+
locked: 'Je account is vergrendeld.'
|
16
|
+
invalid: 'E-mailadres of wachtwoord is onjuist.'
|
17
|
+
invalid_token: 'Verkeerde authenticatie token.'
|
18
|
+
timeout: 'Je sessie is verlopen, log opnieuw in om verder te gaan.'
|
19
|
+
inactive: 'Je account is nog niet geactiveerd.'
|
20
|
+
already_authenticated: 'Je bent al ingelogd.'
|
21
|
+
user_passwords:
|
22
|
+
user:
|
23
|
+
send_instructions: 'Binnen enkele minuten ontvang je een e-mail met instructies om je wachtwoord te resetten.'
|
24
|
+
updated: 'Je wachtwoord is succesvol gewijzigd. Je bent nu ingelogd.'
|
25
|
+
confirmations:
|
26
|
+
send_instructions: 'Binnen enkele minuten ontvang je een e-mail om je account te bevestigen.'
|
27
|
+
confirmed: 'Je account is succesvol bevestigd. Je bent nu ingelogd.'
|
28
|
+
user_registrations:
|
29
|
+
signed_up: 'Welkom! Je bent succesvol aangemeld.'
|
30
|
+
inactive_signed_up: 'Je bent succesvol aangemeld. Maar we kunnen je niet inloggen omdat je account is %{reason}.'
|
31
|
+
updated: 'Je account is succesvol aangepast.'
|
32
|
+
destroyed: 'Tot ziens! Je account is succesvol opgezegd. We hopen je snel terug te zien.'
|
33
|
+
user_sessions:
|
34
|
+
signed_in: 'Succesvol ingelogd.'
|
35
|
+
signed_out: 'Succesvol uitgelogd.'
|
36
|
+
unlocks:
|
37
|
+
send_instructions: 'Binnen enkele minuten ontvang je een e-mail om je account te ontgrendelen.'
|
38
|
+
unlocked: 'Je account is succesvol ontgrendeld. Je bent nu ingelogd.'
|
39
|
+
oauth_callbacks:
|
40
|
+
success: 'Succesvol geautoriseerd van %{kind} account.'
|
41
|
+
failure: 'We konden je niet autoriseren van %{kind} omdat "%{reason}".'
|
42
|
+
mailer:
|
43
|
+
confirmation_instructions:
|
44
|
+
subject: 'Bevestig je account'
|
45
|
+
reset_password_instructions:
|
46
|
+
subject: 'Wijzig je wachtwoord'
|
47
|
+
unlock_instructions:
|
48
|
+
subject: 'Ontgrendel je account'
|
49
|
+
shipment_states:
|
50
|
+
backorder: 'Backorder'
|
51
|
+
partial: 'Gedeeltelijk'
|
52
|
+
pending: 'In afwachting'
|
53
|
+
ready: 'Voltooid'
|
54
|
+
shipped: 'Verzonden'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_auth_devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_core
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 1.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 1.2.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: devise
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,7 +79,6 @@ files:
|
|
79
79
|
- app/controllers/spree/base_controller_decorator.rb
|
80
80
|
- app/controllers/spree/checkout_controller_decorator.rb
|
81
81
|
- app/controllers/spree/orders_controller_decorator.rb
|
82
|
-
- app/controllers/spree/products_controller_decorator.rb
|
83
82
|
- app/controllers/spree/user_passwords_controller.rb
|
84
83
|
- app/controllers/spree/user_registrations_controller.rb
|
85
84
|
- app/controllers/spree/user_sessions_controller.rb
|
@@ -116,7 +115,9 @@ files:
|
|
116
115
|
- app/views/spree/users/show.html.erb
|
117
116
|
- config/initializers/devise.rb
|
118
117
|
- config/initializers/spree.rb
|
118
|
+
- config/locales/de.yml
|
119
119
|
- config/locales/en.yml
|
120
|
+
- config/locales/nl.yml
|
120
121
|
- config/routes.rb
|
121
122
|
- lib/spree/auth/devise.rb
|
122
123
|
- lib/spree/auth/engine.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Spree::ProductsController.class_eval do
|
2
|
-
rescue_from CanCan::AccessDenied, :with => :render_404
|
3
|
-
|
4
|
-
private
|
5
|
-
def load_product
|
6
|
-
@product = Spree::Product.find_by_permalink!(params[:id])
|
7
|
-
if !@product.deleted? && (@product.available_on.nil? || @product.available_on.future?)
|
8
|
-
# Allow admins to view any yet to be available products
|
9
|
-
raise CanCan::AccessDenied unless spree_current_user && spree_current_user.has_spree_role?(:admin)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|