muck-users 0.2.23 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/README.rdoc +3 -1
  2. data/VERSION +1 -1
  3. data/app/controllers/admin/muck/access_codes_controller.rb +78 -0
  4. data/app/controllers/admin/muck/roles_controller.rb +34 -24
  5. data/app/controllers/admin/muck/users_controller.rb +56 -21
  6. data/app/controllers/muck/access_code_requests_controller.rb +27 -0
  7. data/app/controllers/muck/activations_controller.rb +0 -1
  8. data/app/controllers/muck/users_controller.rb +122 -110
  9. data/app/models/role.rb +5 -2
  10. data/app/models/user_mailer.rb +7 -0
  11. data/app/views/access_code_requests/new.html.erb +7 -0
  12. data/app/views/access_code_requests/show.html.erb +1 -0
  13. data/app/views/admin/access_codes/_access_code.html.erb +8 -0
  14. data/app/views/admin/access_codes/_form.html.erb +15 -0
  15. data/app/views/admin/access_codes/_user.html.erb +6 -0
  16. data/app/views/admin/access_codes/bulk.html.erb +12 -0
  17. data/app/views/admin/access_codes/edit.html.erb +6 -0
  18. data/app/views/admin/access_codes/index.html.erb +18 -0
  19. data/app/views/admin/access_codes/new.html.erb +6 -0
  20. data/app/views/admin/access_codes/show.html.erb +30 -0
  21. data/app/views/admin/permissions/_permission.html.erb +3 -0
  22. data/app/views/admin/roles/_role.html.erb +5 -9
  23. data/app/views/admin/roles/edit.html.erb +4 -17
  24. data/app/views/admin/roles/index.html.erb +16 -8
  25. data/app/views/admin/roles/new.html.erb +4 -16
  26. data/app/views/admin/roles/show.html.erb +3 -7
  27. data/app/views/admin/users/_activate.html.erb +2 -2
  28. data/app/views/admin/users/_row.html.erb +8 -2
  29. data/app/views/admin/users/_table.html.erb +10 -15
  30. data/app/views/admin/users/permissions.html.erb +8 -0
  31. data/app/views/user_mailer/access_code.text.html.erb +3 -0
  32. data/app/views/user_mailer/access_code.text.plain.erb +5 -0
  33. data/app/views/users/_signup_form.html.erb +7 -0
  34. data/app/views/users/welcome.html.erb +1 -1
  35. data/config/muck_users_routes.rb +5 -2
  36. data/db/migrate/20100123035450_create_access_codes.rb +19 -0
  37. data/db/migrate/20100123233654_create_access_code_requests.rb +14 -0
  38. data/lib/action_controller/authentic_application.rb +1 -1
  39. data/lib/active_record/acts/muck_access_code.rb +75 -0
  40. data/lib/active_record/acts/muck_access_code_request.rb +33 -0
  41. data/lib/active_record/acts/muck_user.rb +13 -1
  42. data/lib/muck_users.rb +8 -1
  43. data/lib/muck_users/muck_custom_form_builder.rb +10 -0
  44. data/locales/en.yml +163 -102
  45. data/muck-users.gemspec +41 -2
  46. data/test/rails_root/app/models/access_code.rb +3 -0
  47. data/test/rails_root/app/models/access_code_request.rb +3 -0
  48. data/test/rails_root/app/models/user.rb +12 -9
  49. data/test/rails_root/config/environment.rb +1 -0
  50. data/test/rails_root/config/global_config.yml +1 -1
  51. data/test/rails_root/db/migrate/20100123035450_create_access_codes.rb +19 -0
  52. data/test/rails_root/db/migrate/20100123233654_create_access_code_requests.rb +14 -0
  53. data/test/rails_root/public/javascripts/jquery/jquery.jgrowl.js +9 -2
  54. data/test/rails_root/public/javascripts/muck.js +39 -13
  55. data/test/rails_root/public/stylesheets/admin.css +20 -3
  56. data/test/rails_root/public/stylesheets/jquery/cupertino/jquery-ui-1.7.2.custom.css +160 -0
  57. data/test/rails_root/public/stylesheets/jquery/redmond/jquery-ui-1.7.2.custom.css +160 -0
  58. data/test/rails_root/public/stylesheets/jquery/smoothness/jquery-ui-1.7.2.custom.css +160 -0
  59. data/test/rails_root/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.2.custom.css +160 -0
  60. data/test/rails_root/public/stylesheets/styles.css +9 -8
  61. data/test/rails_root/test/functional/access_code_requests_controller_test.rb +33 -0
  62. data/test/rails_root/test/functional/admin/access_codes_controller_test.rb +166 -0
  63. data/test/rails_root/test/unit/access_code_test.rb +100 -0
  64. data/test/rails_root/test/unit/role_test.rb +1 -0
  65. data/test/rails_root/test/unit/user_mailer_test.rb +13 -1
  66. data/test/rails_root/test/unit/user_test.rb +13 -9
  67. metadata +41 -2
@@ -0,0 +1,33 @@
1
+ module ActiveRecord
2
+ module Acts #:nodoc:
3
+ module MuckAccessCodeRequest #:nodoc:
4
+ def self.included(base)
5
+ base.extend(ClassMethods)
6
+ end
7
+
8
+ module ClassMethods
9
+
10
+ def acts_as_muck_access_code_request(options = {})
11
+
12
+ validates_presence_of :email
13
+ validates_uniqueness_of :email
14
+
15
+ named_scope :unfilled, :conditions => 'access_code_requests.code_sent_at IS NULL'
16
+
17
+ include ActiveRecord::Acts::MuckAccessCodeRequest::InstanceMethods
18
+ extend ActiveRecord::Acts::MuckAccessCodeRequest::SingletonMethods
19
+
20
+ end
21
+ end
22
+
23
+ module SingletonMethods
24
+
25
+ end
26
+
27
+ module InstanceMethods
28
+
29
+ end
30
+
31
+ end
32
+ end
33
+ end
@@ -17,6 +17,10 @@ module ActiveRecord
17
17
  named_scope :inactive, :conditions => "activated_at IS NULL"
18
18
  named_scope :recent, lambda { { :conditions => ['created_at > ?', 1.week.ago] } }
19
19
 
20
+ belongs_to :access_code
21
+ accepts_nested_attributes_for :access_code
22
+ attr_accessor :access_code_code
23
+
20
24
  email_name_regex = '[\w\.%\+\-]+'.freeze
21
25
  domain_head_regex = '(?:[A-Z0-9\-]+\.)+'.freeze
22
26
  domain_tld_regex = '(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|jobs|museum)'.freeze
@@ -111,7 +115,11 @@ module ActiveRecord
111
115
  self.password_confirmation = user[:password_confirmation]
112
116
  save
113
117
  end
114
-
118
+
119
+ def is_in_role?(object, roles)
120
+ raise 'not implemented'
121
+ end
122
+
115
123
  def has_role?(rolename)
116
124
  self.any_role?(rolename)
117
125
  end
@@ -168,6 +176,10 @@ module ActiveRecord
168
176
  self.update_attribute(:activated_at, Time.now.utc)
169
177
  end
170
178
 
179
+ def deactivate!
180
+ self.update_attribute(:activated_at, nil)
181
+ end
182
+
171
183
  def short_name
172
184
  CGI::escapeHTML(self.first_name) || self.display_name
173
185
  end
data/lib/muck_users.rb CHANGED
@@ -1,16 +1,23 @@
1
1
  require 'muck_users/exceptions'
2
2
  require 'active_record/secure_methods'
3
+ require 'muck_users/muck_custom_form_builder'
3
4
 
4
5
  ActionController::Base.send :include, ActionController::AuthenticApplication
5
6
  ActiveRecord::Base.send :include, ActiveRecord::SecureMethods
6
7
  ActiveRecord::Base.class_eval { include ActiveRecord::Acts::MuckUser }
8
+ ActiveRecord::Base.class_eval { include ActiveRecord::Acts::MuckAccessCode }
9
+ ActiveRecord::Base.class_eval { include ActiveRecord::Acts::MuckAccessCodeRequest }
7
10
  ActiveRecord::Base.class_eval { include MuckUsers::Exceptions }
8
11
  ActionController::Base.send :helper, MuckUsersHelper
9
12
 
10
13
  I18n.load_path += Dir[ File.join(File.dirname(__FILE__), '..', 'locales', '*.{rb,yml}') ]
11
14
 
12
15
  # Add admin link for users and roles
13
- MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_users'), '/admin/users', '/images/admin/user.gif') rescue nil
16
+ # MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_users'), '/admin/users', '/images/admin/user.gif') rescue nil
17
+ # MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_access_codes'), '/admin/users', '/images/admin/user.gif') rescue nil
18
+ MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_users'), '/admin/users') rescue nil
19
+ MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_roles'), '/admin/roles') rescue nil
20
+ MuckEngine.add_muck_admin_nav_item(I18n.translate('muck.engine.admin_access_codes'), '/admin/access_codes') rescue nil
14
21
 
15
22
  # Add users to the dashboard
16
23
  MuckEngine.add_muck_dashboard_item('admin/users/dashboard_widget') rescue nil
@@ -0,0 +1,10 @@
1
+ module MuckUsersCustomFormBuilder
2
+
3
+ # creates a select control with roles
4
+ def roles_select(method, options = {}, html_options = {})
5
+ self.select(method, Role.by_alpha, options.merge(:wrapper_id => 'roles-container'), html_options.merge(:id => 'roles'))
6
+ end
7
+
8
+ end
9
+
10
+ MuckCustomFormBuilder.send :include, MuckUsersCustomFormBuilder
data/locales/en.yml CHANGED
@@ -2,128 +2,189 @@
2
2
  en:
3
3
  muck:
4
4
  users:
5
+ sign_up_now: Sign-up Now
6
+ old_password_incorrect: Your old password is incorrect.
7
+ bulk_access_code_emails_tip: Separate emails with a comma
8
+ join_application_name: Join and get it done
9
+ email_help: Please use a valid, current e-mail address. We will never share or spam your e-mail address.
10
+ logout_required: ""
11
+ access_required_warning: Site access is currently restricted. You need a valid access code to sign up.
12
+ login_out_success: You have been logged out.
13
+ sign_out_title: Sign Out
14
+ already_registered: Already a member?
15
+ activation_not_found: Activation code not found. Please try creating a new account.
16
+ use_limit_tip: Enter the number of times the access code can be used.
17
+ login_title: Log-in to your Account
18
+ user_disable_problem: There was a problem disabling this user.
19
+ access_code: Access Code
20
+ change_permissions_for: Change Permissions for {{user}}
21
+ login_success: Login successful!
22
+ change_password: Change Password
23
+ add_user_to_role: Add User to Role
24
+ terms_and_service: By clicking 'Sign-up Now' you agree to comply with the {{tos_link_anchor}}Terms and Conditions{{link_end}}.
5
25
  password_reset_link_sent: Instructions to reset your password have been emailed to you. Please check your email.
26
+ deleting_user: deleting user...
27
+ forgot_your_username: Forgot your username?
28
+ email: Email
29
+ login_requred: You must be logged in to access this feature.
30
+ recover_password: Recover Password
31
+ confirm_delete_account: Are you sure you want to delete your account?\nThis can not be undone.
32
+ password_updated: Password successfully updated.
33
+ username_sent: Your username has been sent emailed to you. Please check your Email.
34
+ add_permission: (Add Permission)
35
+ access_code_unlimited: Unlimited
36
+ welcome: Welcome
37
+ bulk_access_codes_created: Bulk access codes created and emailed to {{email_count}} emails.
38
+ users_in_role: "Users in this role:"
39
+ current_password: Current Password
6
40
  problem_creating_account: "There was a problem creating your account. Please correct the following errors:"
7
- users_admin: Users
8
- forgot_password: Forgot Password
9
- application_base_url_not_set: Please set application_base_url in global_config.yml
10
- what_is_the_email: What is the email address used to create your account?
11
- terms_and_service: By clicking 'Sign-up Now' you agree to comply with the {{tos_link_anchor}}Terms and Conditions{{link_end}}.
12
- user_disabled: User disabled
13
- admin_requred: You must be an administrator to access this feature.
14
- login_empty: Please enter a login
15
- password_not_reset: Password not reset.
16
- activation_not_found: Activation code not found. Please try creating a new account.
17
- activation_instructions: Activation Instructions
18
- reset_your_password: Reset Your Password
19
- permission_denied: You don't have permission to complete the requested action.
20
- already_registered: Already a member?
21
- sign_in: Sign In
41
+ password_confirmation_help: To ensure that your password is correct please enter it again here.
42
+ thanks_sign_up_login: Thanks for signing up! You may login now
22
43
  already_activated: Your account has already been activated. You can log in below.
23
- register_for_account: Register for an account
24
- confirm_password: Confirm Password
25
- current_password: Current Password
26
- email_invalid: Invalid email
27
- edit_profile: Edit Profile
28
- username: Username
29
- welcome_email_subject: Welcome to {{application_name}}
30
- confirm_select_new_password: Confirm Password Change
31
- recover_password_prompt: (If you forgot your password recover it here)
32
- delete_my_account: Delete my user account and all my data.
33
- my_dashboard: My Dashboard
44
+ password: Password
45
+ account_not_activated: Your {{application_name}} account has not yet been activated.
46
+ sorry_invalid_reset_code: We're sorry, but we could not locate your account. If you are having issues try copying and pasting the URL from your email into your browser or restarting the reset password process.
47
+ problem_changing_password: There was a problem changing your password. {{errors}}
48
+ user_enable_problem: There was a problem enabling this user.
49
+ access_code_tip: Enter a access code.
34
50
  email_empty: Please enter an email address
35
- logout_required: ""
36
- sign_in_now: Sign in now!
37
- user_update: You're user information has been updated.
38
- complete_profile: Complete Your Profile
39
- email_not_available: Email already in use. {{reset_password_help}}
40
- cannot_deactivate_yourself: You cannot deactivate yourself!
41
- password_reset_email_subject: You have requested to change your {{application_name}} password
42
- user_marked_inactive: User has been marked as inactive
51
+ select_new_password: Select a New Password
52
+ access_code_delete_link: Delete Access Code
53
+ request_access_code: Request Access Code
54
+ updated_permissions: Updated Permissions
55
+ first_name: First Name
56
+ forgot_username: Forgot Username
57
+ account_activated: Your account has been activated! You can now login.
43
58
  already_logged_in: You are already logged in and don't need to recover your password.
44
- email_address: Email Address
45
- user_enable_problem: There was a problem enabling this user.
59
+ email_invalid: Invalid email
60
+ user_disabled: User disabled
61
+ invalid_username: Invalid username
62
+ update: Update
63
+ could_not_find_user_with_email: Could not find a user with that email address.
64
+ password_reset_email_subject: You have requested to change your {{application_name}} password
65
+ cannot_deactivate_yourself: You cannot deactivate yourself!
66
+ bulk_access_codes_description: This will generate a unique, single use access code for each of the emails provided.
67
+ add: Add
68
+ admin:
69
+ activate_all_inactive_users_confirm: Are you sure you want to activate all inactive users in the system? This cannot be undone!
70
+ activate_all_inactive_users: Activate All Inactive Users
71
+ show_emails: Show Emails
72
+ search_users: Search Users
73
+ unactivated_users: There are {{count}} unactivated users
74
+ request_username: Request Username
75
+ name: Name
76
+ sign_in_now: Sign in now!
77
+ my_dashboard: My Dashboard
78
+ confirm_select_new_password: Confirm Password Change
79
+ use_limit: Number of Uses
80
+ add_role: Add Role
81
+ admin_users_title: User Administration
82
+ edit_access_code: Edit Access Code
83
+ click_to_sign_up_now: Click here to sign up now.
84
+ forgot_password: Forgot Password
85
+ login: Login
86
+ user_not_activated_error: Could not activate user
87
+ password_not_reset: Password not reset.
88
+ save: Save
89
+ delete_this_user: Delete this user.
90
+ username_help: You can use between 6 and 20 characters. If the name you want isn't available try adding numbers or punctuation.
91
+ edit_role_dialog_title: Edit Role
92
+ username_not_available: Username not available
93
+ remove_my_account: Remove My Account
94
+ email_available: Email available
95
+ user_enabled: User enabled
46
96
  thanks_sign_up_check: Your account has been created. Please check your e-mail for your account activation instructions!
47
- thanks_sign_up_login: Thanks for signing up! You may login now
97
+ delete_my_account: Delete my user account and all my data.
98
+ edit: Edit
99
+ activation_instructions: Activation Instructions
100
+ access_code_created: Created
101
+ change_permissions: Change Roles
102
+ what_is_the_email: What is the email address used to create your account?
103
+ activation_complete: Activation Complete
104
+ welcome_message: Welcome to muck. This system provides the basic components to help you build your website.
105
+ register_account: Register for a {{application_name}} account
106
+ password_reset: Password reset.
107
+ access_code_uses: Uses
108
+ recover_password_prompt: (If you forgot your password recover it here)
109
+ user_marked_active: User has been marked as active
48
110
  all_users: All Users
49
- user_enabled: User enabled
50
- reset_password: Reset Your Password
51
- forgot_your_password: Forgot your password?
52
- change_password: Change Password
111
+ username: Username
112
+ access_code_request_tip: Enter your email and we'll send you an access code as soon as one is available. Thank you!
113
+ password_mismatch: Password mismatch.
114
+ add_role_dialog_title: Add Role
115
+ new_password_doesnt_match: New password does not match the password confirmation.
116
+ add_permission_to_user: Add Permission to user {{user}}
53
117
  user_account_deleted: You have successfully deleted your account.
54
- last_name: Last Name
55
- password_reset: Password reset.
56
- username_available: Username available
57
- name: Name
58
- account_activated: Your account has been activated! You can now login.
59
- total_users: "Total Users: {{total}}"
60
- request_username: Request Username
118
+ sign_in: Sign In
119
+ complete_profile: Complete Your Profile
120
+ access_codes: Access Codes
121
+ expiration_date_tip: Enter the date upon which the access code will become invalid
122
+ problem_editing_account: There was a problem updating your information.
123
+ access_code_delete_confirm: Are you sure you want to cancel this access code?
61
124
  navigation:
62
125
  inactive_users: Inactive Users
63
126
  all_users: All Users
64
127
  search_users: Search Users
65
- password_confirmation_help: To ensure that your password is correct please enter it again here.
66
- email_available: Email available
67
- welcome: Welcome
128
+ user_marked_inactive: User has been marked as inactive
129
+ access_code_request_thank_you: Thank you for your request. We'll be in touch as soon as possible.
130
+ role: Role
131
+ bulk_access_codes_title: Bulk Access Codes
132
+ users_admin: Users
68
133
  username_recover_prompt: Please provide the email that you used when you created your account, your username will be emailed to you.
134
+ access_code_expires: Expires
69
135
  user_successfully_deleted: User {{login}} was successfully deleted.
70
- update_profile: Update your profile
71
- request_username_subject: Forgotten username
72
- forgot_username: Forgot Username
73
- email_help: Please use a valid, current e-mail address. We will never share or spam your e-mail address.
74
- access_denied: You don't have permission to access the requested page.
75
- username_help: You can use between 6 and 20 characters. If the name you want isn't available try adding numbers or punctuation.
136
+ application_base_url_not_set: Please set application_base_url in global_config.yml
137
+ user_not_deactivated_error: Could not deactivate user
138
+ total_users: "Total Users: {{total}}"
139
+ password_cannot_be_blank: Password field cannot be blank.
140
+ access_code_edit_link: Edit Access Code
141
+ access_code_edit_problem: Problem editing access code
142
+ bulk_access_code_problem: Problem adding access code
143
+ submit: Submit
144
+ confirm_password: Confirm Password
145
+ add_user_to_role_title: Add user to a new role.
146
+ expiration_date: Expiration Date
147
+ roles: Roles
148
+ access_code_related_users: Users who signed up with this code
149
+ login_empty: Please enter a login
150
+ welcome_email_subject: Welcome to {{application_name}}
151
+ access_code_new: New Access Code
76
152
  sign_in_title: Sign In
77
- problem_changing_password: There was a problem changing your password. {{errors}}
78
- problem_editing_account: There was a problem updating your information.
79
- login_success: Login successful!
80
- remember_me: Remember me
81
- password_updated: Password successfully updated.
82
- username_sent: Your username has been sent emailed to you. Please check your Email.
83
- join_application_name: Join and get it done
84
- sign_out_title: Sign Out
85
- login_out_success: You have been logged out.
86
- admin_users_title: User Administration
87
- email_recover_prompt: Please provide the email you signed up with to recover your password.
88
- update_user: Update your user information
89
- welcome_message: Welcome to muck. This system provides the basic components to help you build your website.
90
- old_password_incorrect: Your old password is incorrect.
91
- register_account: Register for a {{application_name}} account
153
+ edit_profile: Edit Profile
154
+ admin_requred: You must be an administrator to access this feature.
155
+ delete: Delete
92
156
  password_help: Your password should be at least six characters long. A Mix of upper and lower-case letters and numbers works well
157
+ login_fail: We're sorry, but we couldn't recognize your login information. Please try again.
158
+ email_not_available: Email already in use. {{reset_password_help}}
159
+ access_code_add_problem: Problem adding access code
160
+ sign_up: Sign up
93
161
  change_your_password: Change Your Password
94
- remove_my_account: Remove My Account
162
+ forgot_your_password: Forgot your password?
163
+ role_delete_confirm: Are you sure you want to delete this role? All associated permissions will also be deleted!
164
+ unlimited: Unlimited
165
+ remember_me: Remember me
166
+ reset_your_password: Reset Your Password
167
+ access_code_use_limit: Use Limit
168
+ access_code_help: If you received a access code from us, please enter it in the box above. You may also {{access_request_anchor}}request a access code{{access_request_anchor_end}}.
169
+ email_address: Email Address
170
+ cant_delete_administrator_role: You can't delete the administrator role.
171
+ view_your_account: View Your Account
172
+ request_username_subject: Forgotten username
95
173
  could_not_find_reset_code: Could not find a password reset code. Please try resetting your password again.
96
- login_fail: We're sorry, but we couldn't recognize your login information. Please try again.
97
- sign_up_now: Sign-up Now
98
- recover_password: Recover Password
99
- login_title: Log-in to your Account
100
- first_name: First Name
174
+ register_for_account: Register for an account
175
+ add_access_code: Add Access Code
176
+ user_update: You're user information has been updated.
177
+ update_profile: Update your profile
178
+ update_user: Update your user information
101
179
  choose_member_name: Member Name
102
- password_mismatch: Password mismatch.
103
- confirm_delete_account: Are you sure you want to delete your account?\nThis can not be undone.
104
- user_disable_problem: There was a problem disabling this user.
105
- could_not_find_user_with_email: Could not find a user with that email address.
106
- sorry_invalid_reset_code: We're sorry, but we could not locate your account. If you are having issues try copying and pasting the URL from your email into your browser or restarting the reset password process.
107
- select_new_password: Select a New Password
108
- forgot_your_username: Forgot your username?
109
- password: Password
110
- activation_complete: Activation Complete
111
- account_not_activated: Your {{application_name}} account has not yet been activated.
112
- admin:
113
- activate_all_inactive_users_confirm: Are you sure you want to activate all inactive users in the system? This cannot be undone!
114
- activate_all_inactive_users: Activate All Inactive Users
115
- show_emails: Show Emails
116
- search_users: Search Users
117
- unactivated_users: There are {{count}} unactivated users
118
- sign_up: Sign up
119
- username_not_available: Username not available
120
- new_password_doesnt_match: New password does not match the password confirmation.
121
- login_requred: You must be logged in to access this feature.
122
- invalid_username: Invalid username
123
- delete_this_user: Delete this user.
124
- password_cannot_be_blank: Password field cannot be blank.
180
+ access_denied: You don't have permission to access the requested page.
181
+ username_available: Username available
182
+ permission_denied: You don't have permission to complete the requested action.
183
+ unlimited_tip: Check here if the access code can be used an unlimited number of times. This will override the use limit.
184
+ last_name: Last Name
185
+ email_recover_prompt: Please provide the email you signed up with to recover your password.
125
186
  thanks_sign_up: Thanks for signing up!
126
- user_marked_active: User has been marked as active
187
+ reset_password: Reset Your Password
127
188
  roles:
128
189
  role_created: Role was successfully created.
129
190
  assign_role: Assign Role
data/muck-users.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-users}
8
- s.version = "0.2.23"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2010-01-22}
12
+ s.date = %q{2010-01-30}
13
13
  s.description = %q{Easily add user signup, login and other features to your application}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
@@ -21,8 +21,10 @@ Gem::Specification.new do |s|
21
21
  "README.rdoc",
22
22
  "Rakefile",
23
23
  "VERSION",
24
+ "app/controllers/admin/muck/access_codes_controller.rb",
24
25
  "app/controllers/admin/muck/roles_controller.rb",
25
26
  "app/controllers/admin/muck/users_controller.rb",
27
+ "app/controllers/muck/access_code_requests_controller.rb",
26
28
  "app/controllers/muck/activations_controller.rb",
27
29
  "app/controllers/muck/password_resets_controller.rb",
28
30
  "app/controllers/muck/user_sessions_controller.rb",
@@ -32,6 +34,17 @@ Gem::Specification.new do |s|
32
34
  "app/models/permission.rb",
33
35
  "app/models/role.rb",
34
36
  "app/models/user_mailer.rb",
37
+ "app/views/access_code_requests/new.html.erb",
38
+ "app/views/access_code_requests/show.html.erb",
39
+ "app/views/admin/access_codes/_access_code.html.erb",
40
+ "app/views/admin/access_codes/_form.html.erb",
41
+ "app/views/admin/access_codes/_user.html.erb",
42
+ "app/views/admin/access_codes/bulk.html.erb",
43
+ "app/views/admin/access_codes/edit.html.erb",
44
+ "app/views/admin/access_codes/index.html.erb",
45
+ "app/views/admin/access_codes/new.html.erb",
46
+ "app/views/admin/access_codes/show.html.erb",
47
+ "app/views/admin/permissions/_permission.html.erb",
35
48
  "app/views/admin/roles/_role.html.erb",
36
49
  "app/views/admin/roles/edit.html.erb",
37
50
  "app/views/admin/roles/index.html.erb",
@@ -48,9 +61,12 @@ Gem::Specification.new do |s|
48
61
  "app/views/admin/users/inactive.html.erb",
49
62
  "app/views/admin/users/inactive_emails.html.erb",
50
63
  "app/views/admin/users/index.html.erb",
64
+ "app/views/admin/users/permissions.html.erb",
51
65
  "app/views/admin/users/search.html.erb",
52
66
  "app/views/password_resets/edit.html.erb",
53
67
  "app/views/password_resets/new.html.erb",
68
+ "app/views/user_mailer/access_code.text.html.erb",
69
+ "app/views/user_mailer/access_code.text.plain.erb",
54
70
  "app/views/user_mailer/activation_confirmation.text.ar.html.erb",
55
71
  "app/views/user_mailer/activation_confirmation.text.ar.plain.erb",
56
72
  "app/views/user_mailer/activation_confirmation.text.bg.html.erb",
@@ -594,13 +610,18 @@ Gem::Specification.new do |s|
594
610
  "config/muck_users_routes.rb",
595
611
  "db/migrate/20090320174818_create_muck_permissions_and_roles.rb",
596
612
  "db/migrate/20090327231918_create_users.rb",
613
+ "db/migrate/20100123035450_create_access_codes.rb",
614
+ "db/migrate/20100123233654_create_access_code_requests.rb",
597
615
  "install.rb",
598
616
  "lib/action_controller/authentic_application.rb",
617
+ "lib/active_record/acts/muck_access_code.rb",
618
+ "lib/active_record/acts/muck_access_code_request.rb",
599
619
  "lib/active_record/acts/muck_user.rb",
600
620
  "lib/active_record/secure_methods.rb",
601
621
  "lib/muck_users.rb",
602
622
  "lib/muck_users/exceptions.rb",
603
623
  "lib/muck_users/initialize_routes.rb",
624
+ "lib/muck_users/muck_custom_form_builder.rb",
604
625
  "lib/muck_users/tasks.rb",
605
626
  "locales/ar.yml",
606
627
  "locales/bg.yml",
@@ -662,6 +683,8 @@ Gem::Specification.new do |s|
662
683
  "test/rails_root/app/controllers/default_controller.rb",
663
684
  "test/rails_root/app/helpers/application_helper.rb",
664
685
  "test/rails_root/app/models/.keep",
686
+ "test/rails_root/app/models/access_code.rb",
687
+ "test/rails_root/app/models/access_code_request.rb",
665
688
  "test/rails_root/app/models/user.rb",
666
689
  "test/rails_root/app/models/user_session.rb",
667
690
  "test/rails_root/app/views/default/index.html.erb",
@@ -685,6 +708,8 @@ Gem::Specification.new do |s|
685
708
  "test/rails_root/db/migrate/20090402234137_create_languages.rb",
686
709
  "test/rails_root/db/migrate/20090426041056_create_countries.rb",
687
710
  "test/rails_root/db/migrate/20090426041103_create_states.rb",
711
+ "test/rails_root/db/migrate/20100123035450_create_access_codes.rb",
712
+ "test/rails_root/db/migrate/20100123233654_create_access_code_requests.rb",
688
713
  "test/rails_root/features/step_definitions/webrat_steps.rb",
689
714
  "test/rails_root/features/support/env.rb",
690
715
  "test/rails_root/lib/tasks/muck.rake",
@@ -1180,6 +1205,7 @@ Gem::Specification.new do |s|
1180
1205
  "test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_cd0a0a_256x240.png",
1181
1206
  "test/rails_root/public/stylesheets/jquery/cupertino/images/ui-icons_ffffff_256x240.png",
1182
1207
  "test/rails_root/public/stylesheets/jquery/cupertino/jquery-ui-1.7.1.custom.css",
1208
+ "test/rails_root/public/stylesheets/jquery/cupertino/jquery-ui-1.7.2.custom.css",
1183
1209
  "test/rails_root/public/stylesheets/jquery/jquery.autocomplete.css",
1184
1210
  "test/rails_root/public/stylesheets/jquery/jquery.fancybox.css",
1185
1211
  "test/rails_root/public/stylesheets/jquery/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png",
@@ -1198,6 +1224,7 @@ Gem::Specification.new do |s|
1198
1224
  "test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_d8e7f3_256x240.png",
1199
1225
  "test/rails_root/public/stylesheets/jquery/redmond/images/ui-icons_f9bd01_256x240.png",
1200
1226
  "test/rails_root/public/stylesheets/jquery/redmond/jquery-ui-1.7.1.custom.css",
1227
+ "test/rails_root/public/stylesheets/jquery/redmond/jquery-ui-1.7.2.custom.css",
1201
1228
  "test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png",
1202
1229
  "test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_flat_75_ffffff_40x100.png",
1203
1230
  "test/rails_root/public/stylesheets/jquery/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png",
@@ -1212,6 +1239,7 @@ Gem::Specification.new do |s|
1212
1239
  "test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_888888_256x240.png",
1213
1240
  "test/rails_root/public/stylesheets/jquery/smoothness/images/ui-icons_cd0a0a_256x240.png",
1214
1241
  "test/rails_root/public/stylesheets/jquery/smoothness/jquery-ui-1.7.1.custom.css",
1242
+ "test/rails_root/public/stylesheets/jquery/smoothness/jquery-ui-1.7.2.custom.css",
1215
1243
  "test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png",
1216
1244
  "test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png",
1217
1245
  "test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-bg_flat_10_000000_40x100.png",
@@ -1227,6 +1255,7 @@ Gem::Specification.new do |s|
1227
1255
  "test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffd27a_256x240.png",
1228
1256
  "test/rails_root/public/stylesheets/jquery/ui-lightness/images/ui-icons_ffffff_256x240.png",
1229
1257
  "test/rails_root/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.1.custom.css",
1258
+ "test/rails_root/public/stylesheets/jquery/ui-lightness/jquery-ui-1.7.2.custom.css",
1230
1259
  "test/rails_root/public/stylesheets/reset.css",
1231
1260
  "test/rails_root/public/stylesheets/styles.css",
1232
1261
  "test/rails_root/public/stylesheets/themes/blue/styles.css",
@@ -1249,7 +1278,9 @@ Gem::Specification.new do |s|
1249
1278
  "test/rails_root/script/runner",
1250
1279
  "test/rails_root/script/server",
1251
1280
  "test/rails_root/test/functional/.keep",
1281
+ "test/rails_root/test/functional/access_code_requests_controller_test.rb",
1252
1282
  "test/rails_root/test/functional/activations_controller_test.rb",
1283
+ "test/rails_root/test/functional/admin/access_codes_controller_test.rb",
1253
1284
  "test/rails_root/test/functional/admin/roles_controller_test.rb",
1254
1285
  "test/rails_root/test/functional/admin/users_controller_test.rb",
1255
1286
  "test/rails_root/test/functional/password_resets_controller_test.rb",
@@ -1259,6 +1290,7 @@ Gem::Specification.new do |s|
1259
1290
  "test/rails_root/test/integration/.keep",
1260
1291
  "test/rails_root/test/test_helper.rb",
1261
1292
  "test/rails_root/test/unit/.keep",
1293
+ "test/rails_root/test/unit/access_code_test.rb",
1262
1294
  "test/rails_root/test/unit/permission_test.rb",
1263
1295
  "test/rails_root/test/unit/role_test.rb",
1264
1296
  "test/rails_root/test/unit/secure_methods_test.rb",
@@ -1279,6 +1311,8 @@ Gem::Specification.new do |s|
1279
1311
  "test/rails_root/app/controllers/application_controller.rb",
1280
1312
  "test/rails_root/app/controllers/default_controller.rb",
1281
1313
  "test/rails_root/app/helpers/application_helper.rb",
1314
+ "test/rails_root/app/models/access_code.rb",
1315
+ "test/rails_root/app/models/access_code_request.rb",
1282
1316
  "test/rails_root/app/models/user.rb",
1283
1317
  "test/rails_root/app/models/user_session.rb",
1284
1318
  "test/rails_root/config/boot.rb",
@@ -1296,11 +1330,15 @@ Gem::Specification.new do |s|
1296
1330
  "test/rails_root/db/migrate/20090402234137_create_languages.rb",
1297
1331
  "test/rails_root/db/migrate/20090426041056_create_countries.rb",
1298
1332
  "test/rails_root/db/migrate/20090426041103_create_states.rb",
1333
+ "test/rails_root/db/migrate/20100123035450_create_access_codes.rb",
1334
+ "test/rails_root/db/migrate/20100123233654_create_access_code_requests.rb",
1299
1335
  "test/rails_root/features/step_definitions/webrat_steps.rb",
1300
1336
  "test/rails_root/features/support/env.rb",
1301
1337
  "test/rails_root/public/dispatch.rb",
1302
1338
  "test/rails_root/script/create_project.rb",
1339
+ "test/rails_root/test/functional/access_code_requests_controller_test.rb",
1303
1340
  "test/rails_root/test/functional/activations_controller_test.rb",
1341
+ "test/rails_root/test/functional/admin/access_codes_controller_test.rb",
1304
1342
  "test/rails_root/test/functional/admin/roles_controller_test.rb",
1305
1343
  "test/rails_root/test/functional/admin/users_controller_test.rb",
1306
1344
  "test/rails_root/test/functional/password_resets_controller_test.rb",
@@ -1308,6 +1346,7 @@ Gem::Specification.new do |s|
1308
1346
  "test/rails_root/test/functional/username_request_controller_test.rb",
1309
1347
  "test/rails_root/test/functional/users_controller_test.rb",
1310
1348
  "test/rails_root/test/test_helper.rb",
1349
+ "test/rails_root/test/unit/access_code_test.rb",
1311
1350
  "test/rails_root/test/unit/permission_test.rb",
1312
1351
  "test/rails_root/test/unit/role_test.rb",
1313
1352
  "test/rails_root/test/unit/secure_methods_test.rb",