muck-users 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +24 -5
- data/Rakefile +8 -8
- data/VERSION +1 -1
- data/app/controllers/muck/password_resets_controller.rb +1 -1
- data/app/models/{muck_user_mailer.rb → user_mailer.rb} +6 -6
- data/app/views/password_resets/edit.html.erb +2 -2
- data/app/views/user_mailer/activation_confirmation.text.html.erb +7 -0
- data/app/views/{muck_user_mailer/activation_confirmation.html.erb → user_mailer/activation_confirmation.text.plain.erb} +0 -0
- data/app/views/user_mailer/activation_instructions.text.html.erb +7 -0
- data/app/views/{muck_user_mailer/activation_instructions.html.erb → user_mailer/activation_instructions.text.plain.erb} +0 -0
- data/app/views/user_mailer/password_not_active_instructions.text.html.erb +10 -0
- data/app/views/{muck_user_mailer/password_not_active_instructions.html.erb → user_mailer/password_not_active_instructions.text.plain.erb} +0 -0
- data/app/views/user_mailer/password_reset_instructions.text.html.erb +10 -0
- data/app/views/{muck_user_mailer/password_reset_instructions.html.erb → user_mailer/password_reset_instructions.text.plain.erb} +0 -0
- data/app/views/user_mailer/username_request.text.html.erb +5 -0
- data/app/views/{muck_user_mailer/username_request.html.erb → user_mailer/username_request.text.plain.erb} +0 -0
- data/app/views/user_mailer/welcome_notification.text.html.erb +5 -0
- data/app/views/{muck_user_mailer/welcome_notification.html.erb → user_mailer/welcome_notification.text.plain.erb} +1 -1
- data/config/muck_users_routes.rb +3 -2
- data/lib/active_record/acts/muck_user.rb +6 -6
- data/muck-users.gemspec +32 -98
- data/pkg/muck-users-0.1.7.gem +0 -0
- data/rdoc/classes/ActiveRecord/Acts/MuckUser/InstanceMethods.html +6 -6
- data/rdoc/created.rid +1 -1
- data/rdoc/files/README_rdoc.html +12 -1
- data/test/rails_root/app/controllers/application_controller.rb +14 -5
- data/test/rails_root/config/environment.rb +3 -1
- data/test/rails_root/test/functional/activations_controller_test.rb +1 -1
- data/test/rails_root/test/functional/admin/users_controller_test.rb +10 -2
- data/test/rails_root/test/functional/password_resets_controller_test.rb +7 -7
- data/test/rails_root/test/functional/users_controller_test.rb +6 -6
- data/test/rails_root/test/unit/{muck_user_mailer_test.rb → user_mailer_test.rb} +12 -12
- data/test/rails_root/vendor/plugins/validation_reflection/CHANGELOG +24 -0
- data/test/rails_root/vendor/plugins/validation_reflection/LICENSE +20 -0
- data/test/rails_root/vendor/plugins/validation_reflection/README +64 -0
- data/test/rails_root/vendor/plugins/validation_reflection/Rakefile +22 -0
- data/test/rails_root/vendor/plugins/validation_reflection/about.yml +7 -0
- data/test/rails_root/vendor/plugins/validation_reflection/init.rb +8 -0
- data/test/rails_root/vendor/plugins/validation_reflection/lib/boiler_plate/validation_reflection.rb +129 -0
- data/test/rails_root/vendor/plugins/validation_reflection/test/test_helper.rb +36 -0
- data/test/rails_root/vendor/plugins/validation_reflection/test/validation_reflection_test.rb +126 -0
- metadata +31 -11
data/README.rdoc
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
The muck users engine is part of the muck framework and relies upon the muck_engine as well as authlogic. Both gems should be installed automatically when you install the muck_users engine.
|
6
6
|
|
7
|
-
sudo gem install
|
7
|
+
sudo gem install muck-users
|
8
8
|
|
9
9
|
Use search logic for searching users. Add this to environment.rb:
|
10
10
|
|
@@ -18,6 +18,25 @@ In addition, you will need to install the ssl_requirement plugin (http://github.
|
|
18
18
|
|
19
19
|
ruby script/plugin install ssl_requirement
|
20
20
|
|
21
|
+
If you used the muck template to create your rails application you will have a global_config.yml file. If not then you will need to create a
|
22
|
+
global_config.yml file and then add the following to environment.rb right above Rails::Initializer.run do |config|
|
23
|
+
|
24
|
+
require 'ostruct'
|
25
|
+
require 'yaml'
|
26
|
+
::GlobalConfig = OpenStruct.new(YAML.load_file("#{RAILS_ROOT}/config/global_config.yml")[RAILS_ENV])
|
27
|
+
|
28
|
+
|
29
|
+
Inside of global_config.yml add the following changing the emails to match your application:
|
30
|
+
|
31
|
+
default: &DEFAULT
|
32
|
+
|
33
|
+
# Sent in emails to users
|
34
|
+
application_name: 'Name of my application'
|
35
|
+
from_email: 'support@example.com'
|
36
|
+
support_email: 'support@example.com'
|
37
|
+
admin_email: 'admin@example.com'
|
38
|
+
|
39
|
+
|
21
40
|
== Usage
|
22
41
|
|
23
42
|
Be sure to add this route to your routes.rb file:
|
@@ -37,10 +56,10 @@ Example
|
|
37
56
|
=======
|
38
57
|
After installing the engine just create a user model thus:
|
39
58
|
|
40
|
-
class User < ActiveRecord::Base
|
41
|
-
|
42
|
-
|
43
|
-
end
|
59
|
+
class User < ActiveRecord::Base
|
60
|
+
acts_as_authentic
|
61
|
+
acts_as_muck_user
|
62
|
+
end
|
44
63
|
|
45
64
|
Then you will be able to go to:
|
46
65
|
http//:localhost:3000/login
|
data/Rakefile
CHANGED
@@ -22,14 +22,14 @@ begin
|
|
22
22
|
gem.add_dependency "binarylogic-searchlogic"
|
23
23
|
gem.add_dependency "bcrypt-ruby"
|
24
24
|
gem.add_dependency "muck-engine"
|
25
|
-
gem.files.include %w( tasks/*
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
25
|
+
# gem.files.include %w( tasks/*
|
26
|
+
# db/migrate/*.rb
|
27
|
+
# app/**/**/**/*
|
28
|
+
# config/*
|
29
|
+
# locales/*
|
30
|
+
# rails/*
|
31
|
+
# test/*
|
32
|
+
# lib/**/* )
|
33
33
|
end
|
34
34
|
rescue LoadError
|
35
35
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.8
|
@@ -17,7 +17,7 @@ class Muck::PasswordResetsController < ApplicationController
|
|
17
17
|
# Forgot password action
|
18
18
|
def create
|
19
19
|
@title = t('muck.users.recover_password')
|
20
|
-
if @user = User.find_by_email(params[:email])
|
20
|
+
if @user = User.find_by_email(params[:reset_password][:email])
|
21
21
|
@user.deliver_password_reset_instructions!
|
22
22
|
flash[:notice] = t('muck.users.password_reset_link_sent')
|
23
23
|
respond_to do |format|
|
@@ -1,6 +1,7 @@
|
|
1
|
-
class
|
1
|
+
class UserMailer < ActionMailer::Base
|
2
2
|
unloadable
|
3
3
|
|
4
|
+
layout 'email_default'
|
4
5
|
default_url_options[:host] = GlobalConfig.application_url
|
5
6
|
|
6
7
|
def activation_confirmation(user)
|
@@ -31,7 +32,7 @@ class MuckUserMailer < ActionMailer::Base
|
|
31
32
|
def welcome_notification(user)
|
32
33
|
setup_email(user)
|
33
34
|
subject I18n.t('muck.users.welcome_email_subject', :application_name => GlobalConfig.application_name)
|
34
|
-
body :
|
35
|
+
body :user => user,
|
35
36
|
:application_name => GlobalConfig.application_name
|
36
37
|
end
|
37
38
|
|
@@ -44,10 +45,9 @@ class MuckUserMailer < ActionMailer::Base
|
|
44
45
|
|
45
46
|
protected
|
46
47
|
def setup_email(user)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
@body[:user] = user
|
48
|
+
recipients user.email
|
49
|
+
from "#{GlobalConfig.application_name} <#{GlobalConfig.email_from}>"
|
50
|
+
sent_on Time.now
|
51
51
|
end
|
52
52
|
|
53
53
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div id="reset-password-confirm" class="common-form">
|
2
2
|
<h1><%= t('muck.users.select_new_password') %></h1>
|
3
3
|
<%= output_errors(t('muck.users.select_new_password'), {:class => 'help-box'}) %>
|
4
|
-
<% custom_form_for
|
4
|
+
<% custom_form_for @user, :url => password_reset_path, :html => {:method => :put} do |f| -%>
|
5
5
|
<%= f.text_field :password, { :label => t('muck.users.password'), :hide_required => true } -%>
|
6
6
|
<%= f.text_field :password_confirmation, { :label => t('muck.users.confirm_password'), :hide_required => true } -%>
|
7
7
|
<%= submit_tag t('muck.users.confirm_select_new_password') %>
|
8
8
|
<% end -%>
|
9
|
-
</div>
|
9
|
+
</div>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<p>Welcome <%= h(@user.login) %>,</p>
|
2
|
+
|
3
|
+
<p>Your account has been activated. Visit the site:</p>
|
4
|
+
|
5
|
+
<a href="<%= root_url %>"><%= root_url %></a>
|
6
|
+
|
7
|
+
<p>If the above URL does not work try copying and pasting it into your browser. If you continue to have problem, please feel free to contact us.</p>
|
File without changes
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<p>Hello <%= h(@user.login) %>,</p>
|
2
|
+
|
3
|
+
<p>Thank you for creating an account! Click the url below to activate your account!</p>
|
4
|
+
|
5
|
+
<a href="<%= @account_activation_url %>"><%= @account_activation_url %></a>
|
6
|
+
|
7
|
+
<p>If the above URL does not work try copying and pasting it into your browser. If you continue to have problem, please feel free to contact us.</p>
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<p>Hello <%= h(@user.login) %>,</p>
|
2
|
+
|
3
|
+
<p>A request to reset your password has been made.
|
4
|
+
If you did not make this request, simply ignore this email.</p>
|
5
|
+
|
6
|
+
<p>Your account has not yet been activated. Simply click the url below to activate your account. After that you may change your password to something that is easy to remember.</p>
|
7
|
+
|
8
|
+
<a href="<%= activate_url(@user.perishable_token) %>"><%= activate_url(@user.perishable_token) %></a>
|
9
|
+
|
10
|
+
<p>If the above URL does not work try copying and pasting it into your browser. If you continue to have problem, please feel free to contact us.</p>
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<p>Hello <%= h(@user.login) %>,</p>
|
2
|
+
|
3
|
+
<p>A request to reset your password has been made.
|
4
|
+
If you did not make this request, simply ignore this email.
|
5
|
+
If you did make this request just click the link below:</p>
|
6
|
+
|
7
|
+
<a href="<%= reset_password_url(@user.perishable_token) %>"><%= reset_password_url(@user.perishable_token) %></a>
|
8
|
+
|
9
|
+
<p>If the above URL does not work try copying and pasting it into your browser.
|
10
|
+
If you continue to have problem please feel free to contact us.</p>
|
File without changes
|
File without changes
|
data/config/muck_users_routes.rb
CHANGED
@@ -2,7 +2,7 @@ ActionController::Routing::Routes.draw do |map|
|
|
2
2
|
|
3
3
|
# users
|
4
4
|
map.resources :users, :controller => 'muck/users',
|
5
|
-
:member => { :enable => :put, :welcome => :get, :activation_instructions => :get },
|
5
|
+
:member => { :enable => :put, :welcome => :get, :activation_instructions => :get },
|
6
6
|
:collection => { :is_login_available => :post, :is_email_available => :post }
|
7
7
|
|
8
8
|
map.with_options(:controller => 'muck/users') do |users|
|
@@ -22,11 +22,12 @@ ActionController::Routing::Routes.draw do |map|
|
|
22
22
|
end
|
23
23
|
|
24
24
|
# passwords
|
25
|
-
map.
|
25
|
+
map.resources :password_resets, :controller => 'muck/password_resets'
|
26
26
|
|
27
27
|
map.with_options(:controller => 'muck/password_resets') do |password_resets|
|
28
28
|
password_resets.forgot_password "/forgot_password", :action => 'new'
|
29
29
|
password_resets.reset_password "/reset_password/:id", :action => 'edit'
|
30
|
+
password_resets.reset_password "/reset_password/:id", :action => 'update', :method => 'put'
|
30
31
|
end
|
31
32
|
|
32
33
|
# username
|
@@ -92,30 +92,30 @@ module ActiveRecord
|
|
92
92
|
module InstanceMethods
|
93
93
|
|
94
94
|
def deliver_welcome_email
|
95
|
-
|
95
|
+
UserMailer.deliver_welcome_notification(self) if GlobalConfig.send_welcome
|
96
96
|
end
|
97
97
|
|
98
98
|
def deliver_activation_confirmation!
|
99
99
|
reset_perishable_token!
|
100
|
-
|
100
|
+
UserMailer.deliver_activation_confirmation(self)
|
101
101
|
end
|
102
102
|
|
103
103
|
def deliver_activation_instructions!
|
104
104
|
reset_perishable_token!
|
105
|
-
|
105
|
+
UserMailer.deliver_activation_instructions(self)
|
106
106
|
end
|
107
107
|
|
108
108
|
def deliver_password_reset_instructions!
|
109
109
|
if self.active?
|
110
110
|
reset_perishable_token!
|
111
|
-
|
111
|
+
UserMailer.deliver_password_reset_instructions(self)
|
112
112
|
else
|
113
|
-
|
113
|
+
UserMailer.deliver_password_not_active_instructions(self)
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
117
|
def deliver_username_request!
|
118
|
-
|
118
|
+
UserMailer.deliver_username_request(self)
|
119
119
|
end
|
120
120
|
|
121
121
|
|
data/muck-users.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{muck-users}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Justin Ball"]
|
9
|
-
s.date = %q{2009-06-
|
9
|
+
s.date = %q{2009-06-24}
|
10
10
|
s.description = %q{Easily add user signup, login and other features to your application}
|
11
11
|
s.email = %q{justinball@gmail.com}
|
12
12
|
s.extra_rdoc_files = [
|
@@ -18,180 +18,102 @@ Gem::Specification.new do |s|
|
|
18
18
|
"Rakefile",
|
19
19
|
"VERSION",
|
20
20
|
"app/controllers/admin/muck/roles_controller.rb",
|
21
|
-
"app/controllers/admin/muck/roles_controller.rb",
|
22
|
-
"app/controllers/admin/muck/users_controller.rb",
|
23
21
|
"app/controllers/admin/muck/users_controller.rb",
|
24
22
|
"app/controllers/muck/activations_controller.rb",
|
25
|
-
"app/controllers/muck/activations_controller.rb",
|
26
23
|
"app/controllers/muck/password_resets_controller.rb",
|
27
|
-
"app/controllers/muck/password_resets_controller.rb",
|
28
|
-
"app/controllers/muck/user_sessions_controller.rb",
|
29
24
|
"app/controllers/muck/user_sessions_controller.rb",
|
30
25
|
"app/controllers/muck/username_request_controller.rb",
|
31
|
-
"app/controllers/muck/username_request_controller.rb",
|
32
|
-
"app/controllers/muck/users_controller.rb",
|
33
26
|
"app/controllers/muck/users_controller.rb",
|
34
|
-
"app/models/muck_user_mailer.rb",
|
35
|
-
"app/models/muck_user_mailer.rb",
|
36
|
-
"app/models/permission.rb",
|
37
27
|
"app/models/permission.rb",
|
38
28
|
"app/models/role.rb",
|
39
|
-
"app/models/
|
40
|
-
"app/views/admin/roles/_role.html.erb",
|
29
|
+
"app/models/user_mailer.rb",
|
41
30
|
"app/views/admin/roles/_role.html.erb",
|
42
31
|
"app/views/admin/roles/edit.html.erb",
|
43
|
-
"app/views/admin/roles/edit.html.erb",
|
44
|
-
"app/views/admin/roles/index.html.erb",
|
45
32
|
"app/views/admin/roles/index.html.erb",
|
46
33
|
"app/views/admin/roles/new.html.erb",
|
47
|
-
"app/views/admin/roles/new.html.erb",
|
48
34
|
"app/views/admin/roles/show.html.erb",
|
49
|
-
"app/views/admin/roles/show.html.erb",
|
50
|
-
"app/views/admin/users/_activate.html.erb",
|
51
35
|
"app/views/admin/users/_activate.html.erb",
|
52
36
|
"app/views/admin/users/_ajax_search_box.html.erb",
|
53
|
-
"app/views/admin/users/_ajax_search_box.html.erb",
|
54
|
-
"app/views/admin/users/_row.html.erb",
|
55
37
|
"app/views/admin/users/_row.html.erb",
|
56
38
|
"app/views/admin/users/_search_box.html.erb",
|
57
|
-
"app/views/admin/users/_search_box.html.erb",
|
58
39
|
"app/views/admin/users/_table.html.erb",
|
59
|
-
"app/views/admin/users/_table.html.erb",
|
60
|
-
"app/views/admin/users/_user_navigation.html.erb",
|
61
40
|
"app/views/admin/users/_user_navigation.html.erb",
|
62
41
|
"app/views/admin/users/do_search.html.erb",
|
63
|
-
"app/views/admin/users/do_search.html.erb",
|
64
|
-
"app/views/admin/users/inactive.html.erb",
|
65
42
|
"app/views/admin/users/inactive.html.erb",
|
66
43
|
"app/views/admin/users/inactive_emails.html.erb",
|
67
|
-
"app/views/admin/users/inactive_emails.html.erb",
|
68
44
|
"app/views/admin/users/index.html.erb",
|
69
|
-
"app/views/admin/users/index.html.erb",
|
70
|
-
"app/views/admin/users/search.html.erb",
|
71
45
|
"app/views/admin/users/search.html.erb",
|
72
|
-
"app/views/muck_user_mailer/activation_confirmation.html.erb",
|
73
|
-
"app/views/muck_user_mailer/activation_confirmation.html.erb",
|
74
|
-
"app/views/muck_user_mailer/activation_instructions.html.erb",
|
75
|
-
"app/views/muck_user_mailer/activation_instructions.html.erb",
|
76
|
-
"app/views/muck_user_mailer/password_not_active_instructions.html.erb",
|
77
|
-
"app/views/muck_user_mailer/password_not_active_instructions.html.erb",
|
78
|
-
"app/views/muck_user_mailer/password_reset_instructions.html.erb",
|
79
|
-
"app/views/muck_user_mailer/password_reset_instructions.html.erb",
|
80
|
-
"app/views/muck_user_mailer/username_request.html.erb",
|
81
|
-
"app/views/muck_user_mailer/username_request.html.erb",
|
82
|
-
"app/views/muck_user_mailer/welcome_notification.html.erb",
|
83
|
-
"app/views/muck_user_mailer/welcome_notification.html.erb",
|
84
46
|
"app/views/password_resets/edit.html.erb",
|
85
|
-
"app/views/password_resets/edit.html.erb",
|
86
|
-
"app/views/password_resets/new.html.erb",
|
87
47
|
"app/views/password_resets/new.html.erb",
|
88
|
-
"app/views/
|
48
|
+
"app/views/user_mailer/activation_confirmation.text.html.erb",
|
49
|
+
"app/views/user_mailer/activation_confirmation.text.plain.erb",
|
50
|
+
"app/views/user_mailer/activation_instructions.text.html.erb",
|
51
|
+
"app/views/user_mailer/activation_instructions.text.plain.erb",
|
52
|
+
"app/views/user_mailer/password_not_active_instructions.text.html.erb",
|
53
|
+
"app/views/user_mailer/password_not_active_instructions.text.plain.erb",
|
54
|
+
"app/views/user_mailer/password_reset_instructions.text.html.erb",
|
55
|
+
"app/views/user_mailer/password_reset_instructions.text.plain.erb",
|
56
|
+
"app/views/user_mailer/username_request.text.html.erb",
|
57
|
+
"app/views/user_mailer/username_request.text.plain.erb",
|
58
|
+
"app/views/user_mailer/welcome_notification.text.html.erb",
|
59
|
+
"app/views/user_mailer/welcome_notification.text.plain.erb",
|
89
60
|
"app/views/user_sessions/new.html.erb",
|
90
61
|
"app/views/username_request/new.html.erb",
|
91
|
-
"app/views/username_request/new.html.erb",
|
92
|
-
"app/views/users/_user.html.erb",
|
93
62
|
"app/views/users/_user.html.erb",
|
94
63
|
"app/views/users/activation_confirmation.html.erb",
|
95
|
-
"app/views/users/activation_confirmation.html.erb",
|
96
|
-
"app/views/users/activation_instructions.html.erb",
|
97
64
|
"app/views/users/activation_instructions.html.erb",
|
98
65
|
"app/views/users/edit.html.erb",
|
99
|
-
"app/views/users/edit.html.erb",
|
100
66
|
"app/views/users/new.html.erb",
|
101
|
-
"app/views/users/new.html.erb",
|
102
|
-
"app/views/users/show.html.erb",
|
103
67
|
"app/views/users/show.html.erb",
|
104
68
|
"app/views/users/welcome.html.erb",
|
105
|
-
"app/views/users/welcome.html.erb",
|
106
|
-
"config/muck_users_routes.rb",
|
107
69
|
"config/muck_users_routes.rb",
|
108
70
|
"db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
|
109
|
-
"db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
|
110
71
|
"install.rb",
|
111
72
|
"lib/action_controller/authentic_application.rb",
|
112
|
-
"lib/action_controller/authentic_application.rb",
|
113
|
-
"lib/active_record/acts/muck_user.rb",
|
114
73
|
"lib/active_record/acts/muck_user.rb",
|
115
74
|
"lib/active_record/secure_methods.rb",
|
116
|
-
"lib/active_record/secure_methods.rb",
|
117
|
-
"lib/muck_users.rb",
|
118
75
|
"lib/muck_users.rb",
|
119
76
|
"lib/muck_users/exceptions.rb",
|
120
|
-
"lib/muck_users/exceptions.rb",
|
121
77
|
"lib/muck_users/initialize_routes.rb",
|
122
|
-
"lib/muck_users/initialize_routes.rb",
|
123
|
-
"lib/muck_users/tasks.rb",
|
124
78
|
"lib/muck_users/tasks.rb",
|
125
79
|
"locales/ar.yml",
|
126
|
-
"locales/ar.yml",
|
127
|
-
"locales/bg.yml",
|
128
80
|
"locales/bg.yml",
|
129
81
|
"locales/ca.yml",
|
130
|
-
"locales/ca.yml",
|
131
82
|
"locales/cs.yml",
|
132
|
-
"locales/cs.yml",
|
133
|
-
"locales/da.yml",
|
134
83
|
"locales/da.yml",
|
135
84
|
"locales/de.yml",
|
136
|
-
"locales/de.yml",
|
137
|
-
"locales/el.yml",
|
138
85
|
"locales/el.yml",
|
139
86
|
"locales/en.yml",
|
140
|
-
"locales/en.yml",
|
141
87
|
"locales/es.yml",
|
142
|
-
"locales/es.yml",
|
143
|
-
"locales/fr.yml",
|
144
88
|
"locales/fr.yml",
|
145
89
|
"locales/it.yml",
|
146
|
-
"locales/it.yml",
|
147
|
-
"locales/iw.yml",
|
148
90
|
"locales/iw.yml",
|
149
91
|
"locales/ja.yml",
|
150
|
-
"locales/ja.yml",
|
151
92
|
"locales/ko.yml",
|
152
|
-
"locales/ko.yml",
|
153
|
-
"locales/lt.yml",
|
154
93
|
"locales/lt.yml",
|
155
94
|
"locales/lv.yml",
|
156
|
-
"locales/lv.yml",
|
157
|
-
"locales/nl.yml",
|
158
95
|
"locales/nl.yml",
|
159
96
|
"locales/no.yml",
|
160
|
-
"locales/no.yml",
|
161
97
|
"locales/pl.yml",
|
162
|
-
"locales/pl.yml",
|
163
|
-
"locales/pt.yml",
|
164
98
|
"locales/pt.yml",
|
165
99
|
"locales/ro.yml",
|
166
|
-
"locales/ro.yml",
|
167
|
-
"locales/ru.yml",
|
168
100
|
"locales/ru.yml",
|
169
101
|
"locales/sk.yml",
|
170
|
-
"locales/sk.yml",
|
171
102
|
"locales/sl.yml",
|
172
|
-
"locales/sl.yml",
|
173
|
-
"locales/sr.yml",
|
174
103
|
"locales/sr.yml",
|
175
104
|
"locales/sv.yml",
|
176
|
-
"locales/sv.yml",
|
177
|
-
"locales/tl.yml",
|
178
105
|
"locales/tl.yml",
|
179
106
|
"locales/uk.yml",
|
180
|
-
"locales/uk.yml",
|
181
107
|
"locales/vi.yml",
|
182
|
-
"locales/vi.yml",
|
183
|
-
"locales/zh-CN.yml",
|
184
108
|
"locales/zh-CN.yml",
|
185
109
|
"locales/zh-TW.yml",
|
186
|
-
"locales/zh-TW.yml",
|
187
|
-
"locales/zh.yml",
|
188
110
|
"locales/zh.yml",
|
189
111
|
"muck-users-0.1.4.gem",
|
190
112
|
"muck-users.gemspec",
|
191
113
|
"pkg/muck-users-0.1.6.gem",
|
114
|
+
"pkg/muck-users-0.1.7.gem",
|
192
115
|
"public/images/profile_default.jpg",
|
193
116
|
"rails/init.rb",
|
194
|
-
"rails/init.rb",
|
195
117
|
"rdoc/classes/ActionController.html",
|
196
118
|
"rdoc/classes/ActionController/AuthenticApplication.html",
|
197
119
|
"rdoc/classes/ActionController/AuthenticApplication/InstanceMethods.html",
|
@@ -221,7 +143,6 @@ Gem::Specification.new do |s|
|
|
221
143
|
"rdoc/index.html",
|
222
144
|
"rdoc/rdoc-style.css",
|
223
145
|
"tasks/rails.rake",
|
224
|
-
"tasks/rails.rake",
|
225
146
|
"test/rails_root/.gitignore",
|
226
147
|
"test/rails_root/.rake_tasks",
|
227
148
|
"test/rails_root/Capfile",
|
@@ -425,13 +346,22 @@ Gem::Specification.new do |s|
|
|
425
346
|
"test/rails_root/test/shoulda_macros/plugins.rb",
|
426
347
|
"test/rails_root/test/test_helper.rb",
|
427
348
|
"test/rails_root/test/unit/.keep",
|
428
|
-
"test/rails_root/test/unit/muck_user_mailer_test.rb",
|
429
349
|
"test/rails_root/test/unit/permission_test.rb",
|
430
350
|
"test/rails_root/test/unit/role_test.rb",
|
351
|
+
"test/rails_root/test/unit/user_mailer_test.rb",
|
431
352
|
"test/rails_root/test/unit/user_test.rb",
|
432
353
|
"test/rails_root/vendor/plugins/ssl_requirement/README",
|
433
354
|
"test/rails_root/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb",
|
434
355
|
"test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb",
|
356
|
+
"test/rails_root/vendor/plugins/validation_reflection/CHANGELOG",
|
357
|
+
"test/rails_root/vendor/plugins/validation_reflection/LICENSE",
|
358
|
+
"test/rails_root/vendor/plugins/validation_reflection/README",
|
359
|
+
"test/rails_root/vendor/plugins/validation_reflection/Rakefile",
|
360
|
+
"test/rails_root/vendor/plugins/validation_reflection/about.yml",
|
361
|
+
"test/rails_root/vendor/plugins/validation_reflection/init.rb",
|
362
|
+
"test/rails_root/vendor/plugins/validation_reflection/lib/boiler_plate/validation_reflection.rb",
|
363
|
+
"test/rails_root/vendor/plugins/validation_reflection/test/test_helper.rb",
|
364
|
+
"test/rails_root/vendor/plugins/validation_reflection/test/validation_reflection_test.rb",
|
435
365
|
"uninstall.rb"
|
436
366
|
]
|
437
367
|
s.has_rdoc = true
|
@@ -477,12 +407,16 @@ Gem::Specification.new do |s|
|
|
477
407
|
"test/rails_root/test/shoulda_macros/pagination.rb",
|
478
408
|
"test/rails_root/test/shoulda_macros/plugins.rb",
|
479
409
|
"test/rails_root/test/test_helper.rb",
|
480
|
-
"test/rails_root/test/unit/muck_user_mailer_test.rb",
|
481
410
|
"test/rails_root/test/unit/permission_test.rb",
|
482
411
|
"test/rails_root/test/unit/role_test.rb",
|
412
|
+
"test/rails_root/test/unit/user_mailer_test.rb",
|
483
413
|
"test/rails_root/test/unit/user_test.rb",
|
484
414
|
"test/rails_root/vendor/plugins/ssl_requirement/lib/ssl_requirement.rb",
|
485
|
-
"test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb"
|
415
|
+
"test/rails_root/vendor/plugins/ssl_requirement/test/ssl_requirement_test.rb",
|
416
|
+
"test/rails_root/vendor/plugins/validation_reflection/init.rb",
|
417
|
+
"test/rails_root/vendor/plugins/validation_reflection/lib/boiler_plate/validation_reflection.rb",
|
418
|
+
"test/rails_root/vendor/plugins/validation_reflection/test/test_helper.rb",
|
419
|
+
"test/rails_root/vendor/plugins/validation_reflection/test/validation_reflection_test.rb"
|
486
420
|
]
|
487
421
|
|
488
422
|
if s.respond_to? :specification_version then
|
Binary file
|
@@ -237,7 +237,7 @@ Authlogic automatically executes the following methods
|
|
237
237
|
<span class="ruby-comment cmt"># File lib/active_record/acts/muck_user.rb, line 99</span>
|
238
238
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliver_activation_confirmation!</span>
|
239
239
|
<span class="ruby-identifier">reset_perishable_token!</span>
|
240
|
-
<span class="ruby-constant">
|
240
|
+
<span class="ruby-constant">UserMailer</span>.<span class="ruby-identifier">deliver_activation_confirmation</span>(<span class="ruby-keyword kw">self</span>)
|
241
241
|
<span class="ruby-keyword kw">end</span>
|
242
242
|
</pre>
|
243
243
|
</div>
|
@@ -261,7 +261,7 @@ Authlogic automatically executes the following methods
|
|
261
261
|
<span class="ruby-comment cmt"># File lib/active_record/acts/muck_user.rb, line 104</span>
|
262
262
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliver_activation_instructions!</span>
|
263
263
|
<span class="ruby-identifier">reset_perishable_token!</span>
|
264
|
-
<span class="ruby-constant">
|
264
|
+
<span class="ruby-constant">UserMailer</span>.<span class="ruby-identifier">deliver_activation_instructions</span>(<span class="ruby-keyword kw">self</span>)
|
265
265
|
<span class="ruby-keyword kw">end</span>
|
266
266
|
</pre>
|
267
267
|
</div>
|
@@ -286,9 +286,9 @@ Authlogic automatically executes the following methods
|
|
286
286
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliver_password_reset_instructions!</span>
|
287
287
|
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">active?</span>
|
288
288
|
<span class="ruby-identifier">reset_perishable_token!</span>
|
289
|
-
<span class="ruby-constant">
|
289
|
+
<span class="ruby-constant">UserMailer</span>.<span class="ruby-identifier">deliver_password_reset_instructions</span>(<span class="ruby-keyword kw">self</span>)
|
290
290
|
<span class="ruby-keyword kw">else</span>
|
291
|
-
<span class="ruby-constant">
|
291
|
+
<span class="ruby-constant">UserMailer</span>.<span class="ruby-identifier">deliver_password_not_active_instructions</span>(<span class="ruby-keyword kw">self</span>)
|
292
292
|
<span class="ruby-keyword kw">end</span>
|
293
293
|
<span class="ruby-keyword kw">end</span>
|
294
294
|
</pre>
|
@@ -312,7 +312,7 @@ Authlogic automatically executes the following methods
|
|
312
312
|
<pre>
|
313
313
|
<span class="ruby-comment cmt"># File lib/active_record/acts/muck_user.rb, line 118</span>
|
314
314
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliver_username_request!</span>
|
315
|
-
<span class="ruby-constant">
|
315
|
+
<span class="ruby-constant">UserMailer</span>.<span class="ruby-identifier">deliver_username_request</span>(<span class="ruby-keyword kw">self</span>)
|
316
316
|
<span class="ruby-keyword kw">end</span>
|
317
317
|
</pre>
|
318
318
|
</div>
|
@@ -335,7 +335,7 @@ Authlogic automatically executes the following methods
|
|
335
335
|
<pre>
|
336
336
|
<span class="ruby-comment cmt"># File lib/active_record/acts/muck_user.rb, line 95</span>
|
337
337
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deliver_welcome_email</span>
|
338
|
-
<span class="ruby-constant">
|
338
|
+
<span class="ruby-constant">UserMailer</span>.<span class="ruby-identifier">deliver_welcome_notification</span>(<span class="ruby-keyword kw">self</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">GlobalConfig</span>.<span class="ruby-identifier">send_welcome</span>
|
339
339
|
<span class="ruby-keyword kw">end</span>
|
340
340
|
</pre>
|
341
341
|
</div>
|
data/rdoc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Fri, 19 Jun 2009 02:09:54 -0600
|
data/rdoc/files/README_rdoc.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>Thu Jun 18
|
59
|
+
<td>Thu Jun 18 16:20:25 -0600 2009</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -96,6 +96,17 @@ into your Rails project:
|
|
96
96
|
<pre>
|
97
97
|
ruby script/plugin install ssl_requirement
|
98
98
|
</pre>
|
99
|
+
<h2>Usage</h2>
|
100
|
+
<p>
|
101
|
+
Be sure to add this route to your routes.rb file:
|
102
|
+
</p>
|
103
|
+
<pre>
|
104
|
+
map.public_user_path '/profiles/:id', :controller => 'profiles', :action => 'show'
|
105
|
+
</pre>
|
106
|
+
<p>
|
107
|
+
This is the path that a user will be redirected to if they attempt to
|
108
|
+
access another user‘s dashboard page.
|
109
|
+
</p>
|
99
110
|
<h2>General information</h2>
|
100
111
|
<p>
|
101
112
|
This engine implements authlogic. Some of the code contained was taken from
|
@@ -3,10 +3,19 @@ class ApplicationController < ActionController::Base
|
|
3
3
|
helper :all
|
4
4
|
protect_from_forgery
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
protected
|
7
|
+
# called by Admin::Muck::BaseController to check whether or not the
|
8
|
+
# user should have access to the admin UI
|
9
|
+
def admin_access?
|
10
|
+
admin?
|
11
|
+
end
|
12
|
+
|
13
|
+
# only require ssl if we are in production
|
14
|
+
def ssl_required?
|
15
|
+
return ENV['SSL'] == 'on' ? true : false if defined? ENV['SSL']
|
16
|
+
return false if local_request?
|
17
|
+
return false if RAILS_ENV == 'test'
|
18
|
+
((self.class.read_inheritable_attribute(:ssl_required_actions) || []).include?(action_name.to_sym)) && (RAILS_ENV == 'production' || RAILS_ENV == 'staging')
|
19
|
+
end
|
11
20
|
|
12
21
|
end
|