kete_browserid 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/config/locales/en.yml
CHANGED
@@ -20,6 +20,7 @@ en:
|
|
20
20
|
login_via_browserid:
|
21
21
|
logged_in: "{{t.account_controller.login.logged_in}}"
|
22
22
|
no_account_matches: "We don't have an account matching your {{t.base.browserid}} login yet. Please sign up."
|
23
|
+
not_yet_activated: "This {{t.base.account}} has not been {{t.base.activated}} yet. You should receive an {{t.base.email}} when it has been. After that you will be able to {{t.base.login}}."
|
23
24
|
signup_as_browserid:
|
24
25
|
signed_up_login_with_browserid: "{{t.base.thank_you}}! Now that your signup is complete, you may now {{t.base.login}}."
|
25
26
|
application_helper:
|
data/kete_browserid.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{kete_browserid}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Walter McGinnis"]
|
12
|
-
s.date = %q{2012-06-
|
12
|
+
s.date = %q{2012-06-20}
|
13
13
|
s.description = %q{An add-on for Kete (http://kete.net.nz) that replaces normal login with a browserid based login.}
|
14
14
|
s.email = %q{walter@katipo.co.nz}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -25,13 +25,23 @@ AccountController.class_eval do
|
|
25
25
|
@user = User.find_by_email(browserid_email)
|
26
26
|
|
27
27
|
if @user
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
# make sure the user has been activated before logging them in
|
29
|
+
if @user.activated_at.blank?
|
30
|
+
flash[:notice] = t('account_controller.login_via_browserid.not_yet_activated')
|
31
|
+
redirect_back_or_default({ :locale => I18n.locale,
|
32
|
+
:urlified_name => @current_basket.urlified_name,
|
33
|
+
:controller => 'account',
|
34
|
+
:action => 'index' }, I18n.locale)
|
35
|
+
|
36
|
+
else
|
37
|
+
self.current_user = @user
|
38
|
+
move_session_searches_to_current_user
|
39
|
+
flash[:notice] = t('account_controller.login_via_browserid.logged_in')
|
40
|
+
redirect_back_or_default({ :locale => current_user.locale,
|
41
|
+
:urlified_name => @current_basket.urlified_name,
|
42
|
+
:controller => 'account',
|
43
|
+
:action => 'index' }, current_user.locale)
|
44
|
+
end
|
35
45
|
else
|
36
46
|
flash[:notice] = t('account_controller.login_via_browserid.no_account_matches')
|
37
47
|
redirect_to :action => :signup_as_browserid, :email => browserid_email
|
@@ -86,7 +96,7 @@ AccountController.class_eval do
|
|
86
96
|
flash[:notice] = t('account_controller.signup_as_browserid.signed_up_login_with_browserid')
|
87
97
|
|
88
98
|
redirect_back_or_default({ :locale => params[:user][:locale],
|
89
|
-
:urlified_name => @
|
99
|
+
:urlified_name => @current_basket.urlified_name,
|
90
100
|
:controller => 'account',
|
91
101
|
:action => 'index' })
|
92
102
|
rescue ActiveRecord::RecordInvalid
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kete_browserid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Walter McGinnis
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-06-
|
18
|
+
date: 2012-06-20 00:00:00 +12:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|