simple_showcase_admin 0.0.1

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.
Files changed (92) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +40 -0
  4. data/app/assets/javascripts/simple_showcase_admin/application.js +23 -0
  5. data/app/assets/javascripts/simple_showcase_admin/jquery.photo_featured.js +3 -0
  6. data/app/assets/javascripts/simple_showcase_admin/jquery.photos.js +18 -0
  7. data/app/assets/stylesheets/simple_showcase_admin/application.css.scss +123 -0
  8. data/app/controllers/simple_showcase_admin/application_controller.rb +10 -0
  9. data/app/controllers/simple_showcase_admin/categories_controller.rb +44 -0
  10. data/app/controllers/simple_showcase_admin/details_controller.rb +20 -0
  11. data/app/controllers/simple_showcase_admin/items_controller.rb +48 -0
  12. data/app/controllers/simple_showcase_admin/password_resets_controller.rb +40 -0
  13. data/app/controllers/simple_showcase_admin/sessions_controller.rb +25 -0
  14. data/app/helpers/simple_showcase_admin/application_helper.rb +12 -0
  15. data/app/helpers/simple_showcase_admin/items_helper.rb +15 -0
  16. data/app/mailers/simple_showcase_admin/user_mailer.rb +12 -0
  17. data/app/models/simple_showcase_admin/category.rb +20 -0
  18. data/app/models/simple_showcase_admin/item.rb +24 -0
  19. data/app/models/simple_showcase_admin/photo.rb +13 -0
  20. data/app/models/simple_showcase_admin/user.rb +25 -0
  21. data/app/uploaders/image_uploader.rb +22 -0
  22. data/app/views/layouts/simple_showcase_admin/application.html.haml +47 -0
  23. data/app/views/simple_showcase_admin/categories/edit.html.haml +9 -0
  24. data/app/views/simple_showcase_admin/categories/index.html.haml +26 -0
  25. data/app/views/simple_showcase_admin/categories/new.html.haml +9 -0
  26. data/app/views/simple_showcase_admin/categories/show.html.haml +49 -0
  27. data/app/views/simple_showcase_admin/details/edit.html.haml +11 -0
  28. data/app/views/simple_showcase_admin/details/show.html.haml +7 -0
  29. data/app/views/simple_showcase_admin/items/_photos.html.haml +12 -0
  30. data/app/views/simple_showcase_admin/items/edit.html.haml +26 -0
  31. data/app/views/simple_showcase_admin/items/index.html.haml +48 -0
  32. data/app/views/simple_showcase_admin/items/new.html.haml +24 -0
  33. data/app/views/simple_showcase_admin/items/show.html.haml +15 -0
  34. data/app/views/simple_showcase_admin/password_resets/edit.html.haml +9 -0
  35. data/app/views/simple_showcase_admin/password_resets/new.html.haml +8 -0
  36. data/app/views/simple_showcase_admin/sessions/new.html.haml +19 -0
  37. data/app/views/simple_showcase_admin/user_mailer/reset_password_email.html.haml +8 -0
  38. data/config/initializers/simple_form.rb +177 -0
  39. data/config/initializers/sorcery.rb +386 -0
  40. data/config/routes.rb +13 -0
  41. data/db/migrate/001_sorcery_core.rb +15 -0
  42. data/db/migrate/002_sorcery_remember_me.rb +15 -0
  43. data/db/migrate/003_sorcery_reset_password.rb +17 -0
  44. data/db/migrate/004_add_slug_to_users.rb +7 -0
  45. data/db/migrate/005_add_first_name_to_users.rb +6 -0
  46. data/db/migrate/006_create_categories.rb +9 -0
  47. data/db/migrate/007_create_items.rb +10 -0
  48. data/db/migrate/008_create_photos.rb +9 -0
  49. data/db/migrate/009_add_category_id_to_items.rb +6 -0
  50. data/db/migrate/010_add_slug_to_categories.rb +7 -0
  51. data/db/migrate/011_add_slug_to_items.rb +6 -0
  52. data/db/migrate/012_add_item_id_to_photos.rb +5 -0
  53. data/db/migrate/013_add_featured_to_photos.rb +5 -0
  54. data/db/migrate/014_add_landscape_to_photos.rb +5 -0
  55. data/lib/generators/simple_showcase_admin/install_generator.rb +69 -0
  56. data/lib/simple_showcase_admin/configuration.rb +11 -0
  57. data/lib/simple_showcase_admin/engine.rb +21 -0
  58. data/lib/simple_showcase_admin/version.rb +3 -0
  59. data/lib/simple_showcase_admin.rb +5 -0
  60. data/lib/tasks/simple_showcase_admin_tasks.rake +4 -0
  61. data/test/dummy/README.rdoc +261 -0
  62. data/test/dummy/Rakefile +7 -0
  63. data/test/dummy/app/assets/javascripts/application.js +15 -0
  64. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  65. data/test/dummy/app/controllers/application_controller.rb +3 -0
  66. data/test/dummy/app/helpers/application_helper.rb +2 -0
  67. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  68. data/test/dummy/config/application.rb +59 -0
  69. data/test/dummy/config/boot.rb +10 -0
  70. data/test/dummy/config/database.yml +25 -0
  71. data/test/dummy/config/environment.rb +5 -0
  72. data/test/dummy/config/environments/development.rb +37 -0
  73. data/test/dummy/config/environments/production.rb +67 -0
  74. data/test/dummy/config/environments/test.rb +37 -0
  75. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  76. data/test/dummy/config/initializers/inflections.rb +15 -0
  77. data/test/dummy/config/initializers/mime_types.rb +5 -0
  78. data/test/dummy/config/initializers/secret_token.rb +7 -0
  79. data/test/dummy/config/initializers/session_store.rb +8 -0
  80. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  81. data/test/dummy/config/locales/en.yml +5 -0
  82. data/test/dummy/config/routes.rb +4 -0
  83. data/test/dummy/config.ru +4 -0
  84. data/test/dummy/public/404.html +26 -0
  85. data/test/dummy/public/422.html +26 -0
  86. data/test/dummy/public/500.html +25 -0
  87. data/test/dummy/public/favicon.ico +0 -0
  88. data/test/dummy/script/rails +6 -0
  89. data/test/integration/navigation_test.rb +10 -0
  90. data/test/simple_showcase_admin_test.rb +7 -0
  91. data/test/test_helper.rb +15 -0
  92. metadata +477 -0
@@ -0,0 +1,9 @@
1
+ %h1 Choose a new password
2
+ = simple_form_for @user, :html => { :class => 'form-horizontal', :method => :put }, :url => password_reset_path(@user) do |f|
3
+ = f.error_notification
4
+ = f.input :email, :input_html => { :class => "span6", :value => @user.email }
5
+ = f.input :password, :input_html => { :class => "span6" }
6
+ = f.input :password_confirmation, :input_html => { :class => "span6" }
7
+ = hidden_field_tag :token, @token
8
+ .form-actions
9
+ = f.submit
@@ -0,0 +1,8 @@
1
+ = form_tag password_resets_path, :method => :post, :class => 'simple_form form-horizontal' do
2
+ .control-group
3
+ = label_tag :email, 'Email *', :class => 'email required control-label'
4
+ .controls
5
+ = text_field_tag :email, params[:email], :class => 'email required string span6'
6
+ .form-actions
7
+ = submit_tag 'Reset', :class => 'button btn btn-primary'
8
+ = link_to 'Cancel', login_path, :class => 'button btn btn-danger'
@@ -0,0 +1,19 @@
1
+ = form_tag sessions_path, :class => 'simple_form form-horizontal' do
2
+ .control-group
3
+ = label_tag :email, 'Email *', :class => 'email required control-label'
4
+ .controls
5
+ = text_field_tag :email, params[:email], :class => 'email required string span6'
6
+ .control-group
7
+ = label_tag :password, 'Password *', :class => 'password required control-label'
8
+ .controls
9
+ = password_field_tag :password, params[:password], :class => 'password required span6'
10
+ .control-group
11
+ .controls
12
+ = check_box_tag :remember_me, 1, params[:remember_me], :class => 'boolean optional'
13
+ %span Remember me
14
+ .control-group
15
+ .controls
16
+ = link_to 'Forgotten your password?', new_password_reset_path
17
+ .form-actions
18
+ = submit_tag "Log in", :class => 'button btn btn-primary'
19
+ .clear
@@ -0,0 +1,8 @@
1
+ %h4 Hello #{ @user.first_name },
2
+
3
+ %p
4
+ You have requested to reset your password.
5
+ %br
6
+ To choose a new password, just follow this link #{ @url }
7
+ %br
8
+ Have a great day!
@@ -0,0 +1,177 @@
1
+ # Use this setup block to configure all options available in SimpleForm.
2
+ SimpleForm.setup do |config|
3
+ # Wrappers are used by the form builder to generate a
4
+ # complete input. You can remove any component from the
5
+ # wrapper, change the order or even add your own to the
6
+ # stack. The options given below are used to wrap the
7
+ # whole input.
8
+ config.wrappers :default, :class => :input,
9
+ :hint_class => :field_with_hint, :error_class => :field_with_errors do |b|
10
+ ## Extensions enabled by default
11
+ # Any of these extensions can be disabled for a
12
+ # given input by passing: `f.input EXTENSION_NAME => false`.
13
+ # You can make any of these extensions optional by
14
+ # renaming `b.use` to `b.optional`.
15
+
16
+ # Determines whether to use HTML5 (:email, :url, ...)
17
+ # and required attributes
18
+ b.use :html5
19
+
20
+ # Calculates placeholders automatically from I18n
21
+ # You can also pass a string as f.input :placeholder => "Placeholder"
22
+ b.use :placeholder
23
+
24
+ ## Optional extensions
25
+ # They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
26
+ # to the input. If so, they will retrieve the values from the model
27
+ # if any exists. If you want to enable the lookup for any of those
28
+ # extensions by default, you can change `b.optional` to `b.use`.
29
+
30
+ # Calculates maxlength from length validations for string inputs
31
+ b.optional :maxlength
32
+
33
+ # Calculates pattern from format validations for string inputs
34
+ b.optional :pattern
35
+
36
+ # Calculates min and max from length validations for numeric inputs
37
+ b.optional :min_max
38
+
39
+ # Calculates readonly automatically from readonly attributes
40
+ b.optional :readonly
41
+
42
+ ## Inputs
43
+ b.use :label_input
44
+ b.use :hint, :wrap_with => { :tag => :span, :class => :hint }
45
+ b.use :error, :wrap_with => { :tag => :span, :class => :error }
46
+ end
47
+
48
+ config.wrappers :bootstrap, :tag => 'div', :class => 'control-group', :error_class => 'error' do |b|
49
+ b.use :html5
50
+ b.use :placeholder
51
+ b.use :label
52
+ b.wrapper :tag => 'div', :class => 'controls' do |ba|
53
+ ba.use :input
54
+ ba.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
55
+ ba.use :hint, :wrap_with => { :tag => 'p', :class => 'help-block' }
56
+ end
57
+ end
58
+
59
+ config.wrappers :prepend, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
60
+ b.use :html5
61
+ b.use :placeholder
62
+ b.use :label
63
+ b.wrapper :tag => 'div', :class => 'controls' do |input|
64
+ input.wrapper :tag => 'div', :class => 'input-prepend' do |prepend|
65
+ prepend.use :input
66
+ end
67
+ input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
68
+ input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
69
+ end
70
+ end
71
+
72
+ config.wrappers :append, :tag => 'div', :class => "control-group", :error_class => 'error' do |b|
73
+ b.use :html5
74
+ b.use :placeholder
75
+ b.use :label
76
+ b.wrapper :tag => 'div', :class => 'controls' do |input|
77
+ input.wrapper :tag => 'div', :class => 'input-append' do |append|
78
+ append.use :input
79
+ end
80
+ input.use :hint, :wrap_with => { :tag => 'span', :class => 'help-block' }
81
+ input.use :error, :wrap_with => { :tag => 'span', :class => 'help-inline' }
82
+ end
83
+ end
84
+
85
+ # Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
86
+ # Check the Bootstrap docs (http://twitter.github.com/bootstrap)
87
+ # to learn about the different styles for forms and inputs,
88
+ # buttons and other elements.
89
+ config.default_wrapper = :bootstrap
90
+
91
+ # Define the way to render check boxes / radio buttons with labels.
92
+ # Defaults to :nested for bootstrap config.
93
+ # :inline => input + label
94
+ # :nested => label > input
95
+ config.boolean_style = :nested
96
+
97
+ # Default class for buttons
98
+ config.button_class = 'btn'
99
+
100
+ # Method used to tidy up errors.
101
+ # config.error_method = :first
102
+
103
+ # Default tag used for error notification helper.
104
+ config.error_notification_tag = :div
105
+
106
+ # CSS class to add for error notification helper.
107
+ config.error_notification_class = 'alert alert-error'
108
+
109
+ # ID to add for error notification helper.
110
+ # config.error_notification_id = nil
111
+
112
+ # Series of attempts to detect a default label method for collection.
113
+ # config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
114
+
115
+ # Series of attempts to detect a default value method for collection.
116
+ # config.collection_value_methods = [ :id, :to_s ]
117
+
118
+ # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
119
+ # config.collection_wrapper_tag = nil
120
+
121
+ # You can define the class to use on all collection wrappers. Defaulting to none.
122
+ # config.collection_wrapper_class = nil
123
+
124
+ # You can wrap each item in a collection of radio/check boxes with a tag,
125
+ # defaulting to :span. Please note that when using :boolean_style = :nested,
126
+ # SimpleForm will force this option to be a label.
127
+ # config.item_wrapper_tag = :span
128
+
129
+ # You can define a class to use in all item wrappers. Defaulting to none.
130
+ # config.item_wrapper_class = nil
131
+
132
+ # How the label text should be generated altogether with the required text.
133
+ config.label_text = lambda { |label, required| "#{required.present? ? '*' : ''} #{label}" }
134
+
135
+ # You can define the class to use on all labels. Default is nil.
136
+ config.label_class = 'control-label'
137
+
138
+ # You can define the class to use on all forms. Default is simple_form.
139
+ # config.form_class = :simple_form
140
+
141
+ # You can define which elements should obtain additional classes
142
+ # config.generate_additional_classes_for = [:wrapper, :label, :input]
143
+
144
+ # Whether attributes are required by default (or not). Default is true.
145
+ # config.required_by_default = true
146
+
147
+ # Tell browsers whether to use default HTML5 validations (novalidate option).
148
+ # Default is enabled.
149
+ config.browser_validations = false
150
+
151
+ # Collection of methods to detect if a file type was given.
152
+ # config.file_methods = [ :mounted_as, :file?, :public_filename ]
153
+
154
+ # Custom mappings for input types. This should be a hash containing a regexp
155
+ # to match as key, and the input type that will be used when the field name
156
+ # matches the regexp as value.
157
+ # config.input_mappings = { /count/ => :integer }
158
+
159
+ # Default priority for time_zone inputs.
160
+ # config.time_zone_priority = nil
161
+
162
+ # Default priority for country inputs.
163
+ # config.country_priority = nil
164
+
165
+ # Default size for text inputs.
166
+ # config.default_input_size = 50
167
+
168
+ # When false, do not use translations for labels.
169
+ # config.translate_labels = true
170
+
171
+ # Automatically discover new inputs in Rails' autoload path.
172
+ # config.inputs_discovery = true
173
+
174
+ # Cache SimpleForm inputs discovery
175
+ # config.cache_discovery = !Rails.env.development?
176
+ end
177
+
@@ -0,0 +1,386 @@
1
+ # The first thing you need to configure is which modules you need in your app.
2
+ # The default is nothing which will include only core features (password encryption, login/logout).
3
+ # Available submodules are: :user_activation, :http_basic_auth, :remember_me,
4
+ # :reset_password, :session_timeout, :brute_force_protection, :activity_logging, :external
5
+ Rails.application.config.sorcery.submodules = [:remember_me, :reset_password]
6
+
7
+ # Here you can configure each submodule's features.
8
+ Rails.application.config.sorcery.configure do |config|
9
+ # -- core --
10
+ # What controller action to call for non-authenticated users. You can also
11
+ # override the 'not_authenticated' method of course.
12
+ # Default: `:not_authenticated`
13
+ #
14
+ # config.not_authenticated_action =
15
+
16
+
17
+ # When a non logged in user tries to enter a page that requires login, save
18
+ # the URL he wanted to reach, and send him there after login, using 'redirect_back_or_to'.
19
+ # Default: `true`
20
+ #
21
+ # config.save_return_to_url =
22
+
23
+
24
+ # Set domain option for cookies; Useful for remember_me submodule.
25
+ # Default: `nil`
26
+ #
27
+ # config.cookie_domain =
28
+
29
+
30
+ # -- session timeout --
31
+ # How long in seconds to keep the session alive.
32
+ # Default: `3600`
33
+ #
34
+ # config.session_timeout =
35
+
36
+
37
+ # Use the last action as the beginning of session timeout.
38
+ # Default: `false`
39
+ #
40
+ # config.session_timeout_from_last_action =
41
+
42
+
43
+ # -- http_basic_auth --
44
+ # What realm to display for which controller name. For example {"My App" => "Application"}
45
+ # Default: `{"application" => "Application"}`
46
+ #
47
+ # config.controller_to_realm_map =
48
+
49
+
50
+ # -- activity logging --
51
+ # will register the time of last user login, every login.
52
+ # Default: `true`
53
+ #
54
+ # config.register_login_time =
55
+
56
+
57
+ # will register the time of last user logout, every logout.
58
+ # Default: `true`
59
+ #
60
+ # config.register_logout_time =
61
+
62
+
63
+ # will register the time of last user action, every action.
64
+ # Default: `true`
65
+ #
66
+ # config.register_last_activity_time =
67
+
68
+
69
+ # -- external --
70
+ # What providers are supported by this app, i.e. [:twitter, :facebook, :github, :google, :liveid] .
71
+ # Default: `[]`
72
+ #
73
+ # config.external_providers =
74
+
75
+
76
+ # You can change it by your local ca_file. i.e. '/etc/pki/tls/certs/ca-bundle.crt'
77
+ # Path to ca_file. By default use a internal ca-bundle.crt.
78
+ # Default: `'path/to/ca_file'`
79
+ #
80
+ # config.ca_file =
81
+
82
+
83
+ # Twitter wil not accept any requests nor redirect uri containing localhost,
84
+ # make sure you use 0.0.0.0:3000 to access your app in development
85
+ #
86
+ # config.twitter.key = ""
87
+ # config.twitter.secret = ""
88
+ # config.twitter.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=twitter"
89
+ # config.twitter.user_info_mapping = {:email => "screen_name"}
90
+ #
91
+ # config.facebook.key = ""
92
+ # config.facebook.secret = ""
93
+ # config.facebook.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=facebook"
94
+ # config.facebook.user_info_mapping = {:email => "name"}
95
+ #
96
+ # config.github.key = ""
97
+ # config.github.secret = ""
98
+ # config.github.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=github"
99
+ # config.github.user_info_mapping = {:email => "name"}
100
+ #
101
+ # config.google.key = ""
102
+ # config.google.secret = ""
103
+ # config.google.callback_url = "http://0.0.0.0:3000/oauth/callback?provider=google"
104
+ # config.google.user_info_mapping = {:email => "email", :username => "name"}
105
+ #
106
+ # To use liveid in development mode you have to replace mydomain.com with
107
+ # a valid domain even in development. To use a valid domain in development
108
+ # simply add your domain in your /etc/hosts file in front of 127.0.0.1
109
+ #
110
+ # config.liveid.key = ""
111
+ # config.liveid.secret = ""
112
+ # config.liveid.callback_url = "http://mydomain.com:3000/oauth/callback?provider=liveid"
113
+ # config.liveid.user_info_mapping = {:username => "name"}
114
+
115
+
116
+ # --- user config ---
117
+ config.user_config do |user|
118
+ # -- core --
119
+ # specify username attributes, for example: [:username, :email].
120
+ # Default: `[:username]`
121
+ #
122
+ user.username_attribute_names = :email
123
+
124
+
125
+ # change *virtual* password attribute, the one which is used until an encrypted one is generated.
126
+ # Default: `:password`
127
+ #
128
+ # user.password_attribute_name =
129
+
130
+
131
+ # downcase the username before trying to authenticate, default is false
132
+ # Default: `false`
133
+ #
134
+ # user.downcase_username_before_authenticating =
135
+
136
+
137
+ # change default email attribute.
138
+ # Default: `:email`
139
+ #
140
+ # user.email_attribute_name =
141
+
142
+
143
+ # change default crypted_password attribute.
144
+ # Default: `:crypted_password`
145
+ #
146
+ # user.crypted_password_attribute_name =
147
+
148
+
149
+ # what pattern to use to join the password with the salt
150
+ # Default: `""`
151
+ #
152
+ # user.salt_join_token =
153
+
154
+
155
+ # change default salt attribute.
156
+ # Default: `:salt`
157
+ #
158
+ # user.salt_attribute_name =
159
+
160
+
161
+ # how many times to apply encryption to the password.
162
+ # Default: `nil`
163
+ #
164
+ # user.stretches =
165
+
166
+
167
+ # encryption key used to encrypt reversible encryptions such as AES256.
168
+ # WARNING: If used for users' passwords, changing this key will leave passwords undecryptable!
169
+ # Default: `nil`
170
+ #
171
+ # user.encryption_key =
172
+
173
+
174
+ # use an external encryption class.
175
+ # Default: `nil`
176
+ #
177
+ # user.custom_encryption_provider =
178
+
179
+
180
+ # encryption algorithm name. See 'encryption_algorithm=' for available options.
181
+ # Default: `:bcrypt`
182
+ #
183
+ # user.encryption_algorithm =
184
+
185
+
186
+ # make this configuration inheritable for subclasses. Useful for ActiveRecord's STI.
187
+ # Default: `false`
188
+ #
189
+ # user.subclasses_inherit_config =
190
+
191
+
192
+ # -- user_activation --
193
+ # the attribute name to hold activation state (active/pending).
194
+ # Default: `:activation_state`
195
+ #
196
+ # user.activation_state_attribute_name =
197
+
198
+
199
+ # the attribute name to hold activation code (sent by email).
200
+ # Default: `:activation_token`
201
+ #
202
+ # user.activation_token_attribute_name =
203
+
204
+
205
+ # the attribute name to hold activation code expiration date.
206
+ # Default: `:activation_token_expires_at`
207
+ #
208
+ # user.activation_token_expires_at_attribute_name =
209
+
210
+
211
+ # how many seconds before the activation code expires. nil for never expires.
212
+ # Default: `nil`
213
+ #
214
+ # user.activation_token_expiration_period =
215
+
216
+
217
+ # your mailer class. Required.
218
+ # Default: `nil`
219
+ #
220
+ # user.user_activation_mailer =
221
+
222
+
223
+ # when true sorcery will not automatically
224
+ # email activation details and allow you to
225
+ # manually handle how and when email is sent.
226
+ # Default: `false`
227
+ #
228
+ # user.activation_mailer_disabled =
229
+
230
+
231
+ # activation needed email method on your mailer class.
232
+ # Default: `:activation_needed_email`
233
+ #
234
+ # user.activation_needed_email_method_name =
235
+
236
+
237
+ # activation success email method on your mailer class.
238
+ # Default: `:activation_success_email`
239
+ #
240
+ # user.activation_success_email_method_name =
241
+
242
+
243
+ # do you want to prevent or allow users that did not activate by email to login?
244
+ # Default: `true`
245
+ #
246
+ # user.prevent_non_active_users_to_login =
247
+
248
+
249
+ # -- reset_password --
250
+ # reset password code attribute name.
251
+ # Default: `:reset_password_token`
252
+ #
253
+ # user.reset_password_token_attribute_name =
254
+
255
+
256
+ # expires at attribute name.
257
+ # Default: `:reset_password_token_expires_at`
258
+ #
259
+ # user.reset_password_token_expires_at_attribute_name =
260
+
261
+
262
+ # when was email sent, used for hammering protection.
263
+ # Default: `:reset_password_email_sent_at`
264
+ #
265
+ # user.reset_password_email_sent_at_attribute_name =
266
+
267
+
268
+ # mailer class. Needed.
269
+ # Default: `nil`
270
+ #
271
+ user.reset_password_mailer = SimpleShowcaseAdmin::UserMailer
272
+
273
+
274
+ # reset password email method on your mailer class.
275
+ # Default: `:reset_password_email`
276
+ #
277
+ # user.reset_password_email_method_name =
278
+
279
+
280
+ # when true sorcery will not automatically
281
+ # email password reset details and allow you to
282
+ # manually handle how and when email is sent
283
+ # Default: `false`
284
+ #
285
+ # user.reset_password_mailer_disabled =
286
+
287
+
288
+ # reset password email
289
+ # method on your mailer
290
+ # class.
291
+ # Default: `:reset_password_email`
292
+ #
293
+ # user.reset_password_email_method_name =
294
+
295
+ # how many seconds before the reset request expires. nil for never expires.
296
+ # Default: `nil`
297
+ #
298
+ # user.reset_password_expiration_period =
299
+
300
+
301
+ # hammering protection, how long to wait before allowing another email to be sent.
302
+ # Default: `5 * 60`
303
+ #
304
+ # user.reset_password_time_between_emails =
305
+
306
+
307
+ # -- brute_force_protection --
308
+ # Failed logins attribute name.
309
+ # Default: `:failed_logins_count`
310
+ #
311
+ # user.failed_logins_count_attribute_name =
312
+
313
+
314
+ # This field indicates whether user is banned and when it will be active again.
315
+ # Default: `:lock_expires_at`
316
+ #
317
+ # user.lock_expires_at_attribute_name =
318
+
319
+
320
+ # How many failed logins allowed.
321
+ # Default: `50`
322
+ #
323
+ # user.consecutive_login_retries_amount_limit =
324
+
325
+
326
+ # How long the user should be banned. in seconds. 0 for permanent.
327
+ # Default: `60 * 60`
328
+ #
329
+ # user.login_lock_time_period =
330
+
331
+
332
+ # -- activity logging --
333
+ # Last login attribute name.
334
+ # Default: `:last_login_at`
335
+ #
336
+ # user.last_login_at_attribute_name =
337
+
338
+
339
+ # Last logout attribute name.
340
+ # Default: `:last_logout_at`
341
+ #
342
+ # user.last_logout_at_attribute_name =
343
+
344
+
345
+ # Last activity attribute name.
346
+ # Default: `:last_activity_at`
347
+ #
348
+ # user.last_activity_at_attribute_name =
349
+
350
+
351
+ # How long since last activity is he user defined logged out?
352
+ # Default: `10 * 60`
353
+ #
354
+ # user.activity_timeout =
355
+
356
+
357
+ # -- external --
358
+ # Class which holds the various external provider data for this user.
359
+ # Default: `nil`
360
+ #
361
+ # user.authentications_class =
362
+
363
+
364
+ # User's identifier in authentications class.
365
+ # Default: `:user_id`
366
+ #
367
+ # user.authentications_user_id_attribute_name =
368
+
369
+
370
+ # Provider's identifier in authentications class.
371
+ # Default: `:provider`
372
+ #
373
+ # user.provider_attribute_name =
374
+
375
+
376
+ # User's external unique identifier in authentications class.
377
+ # Default: `:uid`
378
+ #
379
+ # user.provider_uid_attribute_name =
380
+ end
381
+
382
+ # This line must come after the 'user config' block.
383
+ # Define which model authenticates with sorcery.
384
+ config.user_class = "SimpleShowcaseAdmin::User"
385
+ end
386
+