lesli 5.0.11 → 5.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/lesli_manifest.js +0 -13
  3. data/app/assets/icons/lesli/engine-security.svg +1 -0
  4. data/app/assets/icons/lesli/engine-shield.svg +1 -0
  5. data/app/assets/images/lesli/lesli-logo.svg +4 -0
  6. data/app/assets/stylesheets/lesli/templates/application.css +21862 -209
  7. data/app/assets/stylesheets/lesli/templates/public.css +19098 -1
  8. data/app/assets/stylesheets/lesli/users/confirmations.css +19219 -0
  9. data/app/assets/stylesheets/lesli/users/passwords.css +19202 -0
  10. data/app/assets/stylesheets/lesli/users/registrations.css +19594 -0
  11. data/app/assets/stylesheets/lesli/users/sessions.css +19594 -1
  12. data/app/controllers/lesli/abouts_controller.rb +12 -18
  13. data/app/controllers/lesli/application_controller.rb +25 -25
  14. data/app/controllers/lesli/application_lesli_controller.rb +5 -6
  15. data/app/controllers/lesli/interfaces/application/authorization.rb +1 -1
  16. data/app/controllers/lesli/interfaces/application/customization.rb +1 -1
  17. data/app/controllers/lesli/interfaces/application/requester.rb +2 -2
  18. data/app/controllers/lesli/interfaces/application/responder.rb +8 -8
  19. data/app/controllers/lesli/interfaces/controllers/actions.rb +250 -0
  20. data/app/controllers/lesli/interfaces/controllers/activities.rb +215 -0
  21. data/app/controllers/lesli/interfaces/controllers/discussions.rb +270 -0
  22. data/app/controllers/lesli/interfaces/controllers/files.rb +467 -0
  23. data/app/controllers/lesli/interfaces/controllers/subscribers.rb +234 -0
  24. data/app/helpers/lesli/assets_helper.rb +4 -4
  25. data/app/helpers/lesli/navigation_helper.rb +38 -81
  26. data/app/lib/lesli/system.rb +4 -3
  27. data/app/models/concerns/account_initializer.rb +46 -42
  28. data/{lib/scss/devise/registrations.scss → app/models/lesli/account/detail.rb} +7 -3
  29. data/app/models/lesli/account.rb +12 -5
  30. data/app/models/lesli/cloud_object/action.rb +70 -0
  31. data/app/models/lesli/cloud_object/activity.rb +311 -0
  32. data/app/models/lesli/cloud_object/custom_field.rb +158 -0
  33. data/app/models/lesli/cloud_object/discussion.rb +219 -0
  34. data/app/models/lesli/cloud_object/subscriber.rb +186 -0
  35. data/app/models/lesli/shared/dashboard.rb +16 -5
  36. data/app/models/lesli/user/session.rb +0 -2
  37. data/app/models/lesli/user.rb +13 -13
  38. data/app/operators/lesli/user_registration_operator.rb +3 -3
  39. data/app/views/lesli/layouts/application-devise.html.erb +6 -6
  40. data/app/views/lesli/layouts/application-lesli.html.erb +1 -1
  41. data/app/views/lesli/partials/_application-data.html.erb +2 -1
  42. data/app/views/lesli/partials/_application-lesli-engines.html.erb +14 -39
  43. data/app/views/lesli/partials/_application-lesli-header.html.erb +4 -4
  44. data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
  45. data/app/views/lesli/partials/_application-lesli-panels.html.erb +7 -7
  46. data/app/views/lesli/wrappers/_application-devise.html.erb +5 -7
  47. data/config/initializers/devise.rb +335 -335
  48. data/config/initializers/lesli.rb +2 -1
  49. data/config/locales/translations.en.yml +4 -0
  50. data/config/locales/translations.es.yml +4 -0
  51. data/config/locales/translations.fr.yml +28 -0
  52. data/config/locales/translations.it.yml +28 -0
  53. data/config/locales/translations.pt.yml +28 -0
  54. data/config/routes.rb +1 -10
  55. data/db/migrate/{v1.0/0010003010_create_lesli_user_details.rb → v1/0010000110_create_lesli_accounts.rb} +19 -13
  56. data/db/migrate/{v1.0/0010000110_create_lesli_accounts.rb → v1/0010001010_create_lesli_account_details.rb} +5 -7
  57. data/db/migrate/{v1.0/0010001010_create_lesli_account_settings.rb → v1/0010001110_create_lesli_account_settings.rb} +2 -2
  58. data/db/seed/development/accounts.rb +10 -7
  59. data/db/seed/development/users.rb +20 -20
  60. data/db/seed/production/accounts.rb +10 -7
  61. data/lib/lesli/engine.rb +2 -12
  62. data/lib/lesli/version.rb +2 -2
  63. data/lib/lesli.rb +0 -1
  64. data/lib/scss/cloud-objects/discussion.scss +8 -5
  65. data/lib/scss/layouts/application-header.scss +3 -1
  66. data/lib/scss/layouts/application-navbar.scss +2 -1
  67. data/lib/scss/{elements/msg.scss → overrides/notification.scss} +16 -18
  68. data/lib/scss/pages/devise-simple.scss +4 -2
  69. data/lib/scss/pages/devise.scss +111 -107
  70. data/lib/scss/panels/panel-notification.scss +1 -1
  71. data/lib/scss/panels/{panel-ticket.scss → panel-support-ticket.scss} +3 -4
  72. data/lib/scss/templates/application.scss +7 -5
  73. data/lib/tasks/lesli/controllers.rake +1 -1
  74. data/lib/tasks/lesli/db.rake +24 -12
  75. data/lib/tasks/lesli_tasks.rake +6 -6
  76. data/lib/vue/application.js +13 -12
  77. data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/content.vue +10 -8
  78. data/lib/vue/cloudobjects/discussion/element.vue +170 -0
  79. data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/filters.vue +1 -1
  80. data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/new.vue +20 -16
  81. data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion.vue +25 -24
  82. data/lib/vue/{refactor/stores/cloudobjects → cloudobjects/stores}/discussion.js +7 -16
  83. data/lib/vue/layouts/application-header.vue +5 -5
  84. data/lib/vue/panels/{panel-notifications.vue → panel-bell-notifications.vue} +15 -19
  85. data/lib/vue/panels/panel-support-tickets.vue +161 -0
  86. data/lib/vue/panels/stores/bell-notifications.js +46 -0
  87. data/lib/vue/panels/stores/support-tickets.js +103 -0
  88. data/lib/vue/shared/dashboards/apps/edit.vue +10 -10
  89. data/lib/vue/shared/dashboards/components/form.vue +31 -40
  90. data/lib/vue/shared/stores/dashboard.js +2 -0
  91. data/lib/vue/shared/stores/layout.js +2 -1
  92. data/lib/{scss/devise/confirmations.scss → vue/shared/stores/users.js} +22 -21
  93. data/lib/vue/stores/translations.json +109 -2
  94. data/lib/webpack/base.js +9 -8
  95. data/lib/webpack/core.js +8 -6
  96. data/readme.md +16 -15
  97. metadata +49 -76
  98. data/app/assets/icons/lesli/engine-guard.svg +0 -1
  99. data/app/assets/javascripts/lesli/users/sessions.js +0 -1
  100. data/app/controllers/users/confirmations_controller.rb +0 -66
  101. data/app/controllers/users/omniauth_callbacks_controller.rb +0 -30
  102. data/app/controllers/users/passwords_controller.rb +0 -71
  103. data/app/controllers/users/registrations_controller.rb +0 -141
  104. data/app/controllers/users/sessions_controller.rb +0 -141
  105. data/app/controllers/users/unlocks_controller.rb +0 -30
  106. data/app/views/devise/confirmations/new.html.erb +0 -2
  107. data/app/views/devise/confirmations/show.html.erb +0 -63
  108. data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  109. data/app/views/devise/mailer/email_changed.html.erb +0 -7
  110. data/app/views/devise/mailer/password_change.html.erb +0 -3
  111. data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
  112. data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
  113. data/app/views/devise/passwords/edit.html.erb +0 -79
  114. data/app/views/devise/passwords/new.html.erb +0 -75
  115. data/app/views/devise/registrations/edit.html.erb +0 -43
  116. data/app/views/devise/registrations/new.html.erb +0 -147
  117. data/app/views/devise/sessions/new.html.erb +0 -114
  118. data/app/views/devise/shared/_demo.html.erb +0 -7
  119. data/app/views/devise/shared/_error_messages.html.erb +0 -15
  120. data/app/views/devise/shared/_links.html.erb +0 -96
  121. data/app/views/devise/unlocks/new.html.erb +0 -16
  122. data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +0 -59
  123. data/db/migrate/v1.0/0010000310_create_lesli_users.rb +0 -97
  124. data/db/migrate/v1.0/0010003110_create_lesli_user_settings.rb +0 -44
  125. data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +0 -55
  126. data/db/migrate/v1.0/0010003410_create_lesli_user_powers.rb +0 -43
  127. data/db/migrate/v1.0/0010004010_create_lesli_user_logs.rb +0 -45
  128. data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +0 -44
  129. data/db/migrate/v1.0/0010005110_create_lesli_descriptor_privileges.rb +0 -45
  130. data/db/migrate/v1.0/0010005210_create_lesli_descriptor_activities.rb +0 -49
  131. data/db/migrate/v1.0/0010005510_create_lesli_role_powers.rb +0 -51
  132. data/db/migrate/v1.0/0010005710_create_lesli_role_privileges.rb +0 -45
  133. data/lib/lesli/routing.rb +0 -26
  134. data/lib/scss/components/editor-richtext.scss +0 -88
  135. data/lib/scss/devise/oauth.scss +0 -34
  136. data/lib/scss/devise/passwords.scss +0 -33
  137. data/lib/scss/devise/sessions.scss +0 -35
  138. data/lib/scss/elements/avatar.scss +0 -48
  139. data/lib/scss/elements/calendar.scss +0 -47
  140. data/lib/scss/elements/toggle.scss +0 -102
  141. data/lib/vue/devise/confirmations.js +0 -33
  142. data/lib/vue/devise/passwords.js +0 -137
  143. data/lib/vue/devise/registrations.js +0 -157
  144. data/lib/vue/devise/sessions.js +0 -148
  145. data/lib/vue/panels/panel-tickets.vue +0 -181
  146. data/lib/vue/refactor/shared/cloudobjects/discussion/element.vue +0 -132
  147. data/lib/vue/shared/stores/account.js +0 -113
  148. /data/app/assets/icons/lesli/{engine-driver.svg → engine-calendar.svg} +0 -0
  149. /data/db/migrate/{v1.0 → v1}/0010000610_create_lesli_system_controllers.rb +0 -0
  150. /data/db/migrate/{v1.0 → v1}/0010000710_create_lesli_system_controller_actions.rb +0 -0
  151. /data/db/migrate/{v1.0 → v1}/0010001210_create_lesli_account_activities.rb +0 -0
  152. /data/db/migrate/{v1.0 → v1}/0010001410_create_lesli_account_logs.rb +0 -0
@@ -1,336 +1,336 @@
1
- # frozen_string_literal: true
2
-
3
- # Assuming you have not yet modified this file, each configuration option below
4
- # is set to its default value. Note that some are commented out while others
5
- # are not: uncommented lines are intended to protect your configuration from
6
- # breaking changes in upgrades (i.e., in the event that future versions of
7
- # Devise change the default values for those options).
8
- #
9
- # Use this hook to configure devise mailer, warden hooks and so forth.
10
- # Many of these configuration options can be set straight in your model.
11
- Devise.setup do |config|
12
- # The secret key used by Devise. Devise uses this key to generate
13
- # random tokens. Changing this key will render invalid all existing
14
- # confirmation, reset password and unlock tokens in the database.
15
- # Devise will use the `secret_key_base` as its `secret_key`
16
- # by default. You can change it below and use your own secret key.
17
- # config.secret_key = '418b0e734e2cf533487ad8ee828e01e6482c597dd99cc9b1a11c35ae40ac8cfb1d89a17474d013f7f4dc1b1b92ba793688ecd92134fdd4cf8c08912d30e2a2e4'
18
-
19
- # ==> Controller configuration
20
- # Configure the parent class to the devise controllers.
21
- # config.parent_controller = 'DeviseController'
22
-
23
- # ==> Mailer Configuration
24
- # Configure the e-mail address which will be shown in Devise::Mailer,
25
- # note that it will be overwritten if you use your own mailer class
26
- # with default "from" parameter.
27
- config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
28
-
29
- # Configure the class responsible to send e-mails.
30
- # config.mailer = 'Devise::Mailer'
31
-
32
- # Configure the parent class responsible to send e-mails.
33
- # config.parent_mailer = 'ActionMailer::Base'
34
-
35
- # ==> ORM configuration
36
- # Load and configure the ORM. Supports :active_record (default) and
37
- # :mongoid (bson_ext recommended) by default. Other ORMs may be
38
- # available as additional gems.
39
- require 'devise/orm/active_record'
40
-
41
- # ==> Configuration for any authentication mechanism
42
- # Configure which keys are used when authenticating a user. The default is
43
- # just :email. You can configure it to use [:username, :subdomain], so for
44
- # authenticating a user, both parameters are required. Remember that those
45
- # parameters are used only when authenticating and not when retrieving from
46
- # session. If you need permissions, you should implement that in a before filter.
47
- # You can also supply a hash where the value is a boolean determining whether
48
- # or not authentication should be aborted when the value is not present.
49
- # config.authentication_keys = [:email]
50
-
51
- # Configure parameters from the request object used for authentication. Each entry
52
- # given should be a request method and it will automatically be passed to the
53
- # find_for_authentication method and considered in your model lookup. For instance,
54
- # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
55
- # The same considerations mentioned for authentication_keys also apply to request_keys.
56
- # config.request_keys = []
57
-
58
- # Configure which authentication keys should be case-insensitive.
59
- # These keys will be downcased upon creating or modifying a user and when used
60
- # to authenticate or find a user. Default is :email.
61
- config.case_insensitive_keys = [:email]
62
-
63
- # Configure which authentication keys should have whitespace stripped.
64
- # These keys will have whitespace before and after removed upon creating or
65
- # modifying a user and when used to authenticate or find a user. Default is :email.
66
- config.strip_whitespace_keys = [:email]
67
-
68
- # Tell if authentication through request.params is enabled. True by default.
69
- # It can be set to an array that will enable params authentication only for the
70
- # given strategies, for example, `config.params_authenticatable = [:database]` will
71
- # enable it only for database (email + password) authentication.
72
- # config.params_authenticatable = true
73
-
74
- # Tell if authentication through HTTP Auth is enabled. False by default.
75
- # It can be set to an array that will enable http authentication only for the
76
- # given strategies, for example, `config.http_authenticatable = [:database]` will
77
- # enable it only for database authentication.
78
- # For API-only applications to support authentication "out-of-the-box", you will likely want to
79
- # enable this with :database unless you are using a custom strategy.
80
- # The supported strategies are:
81
- # :database = Support basic authentication with authentication key + password
82
- # config.http_authenticatable = false
83
-
84
- # If 401 status code should be returned for AJAX requests. True by default.
85
- # config.http_authenticatable_on_xhr = true
86
-
87
- # The realm used in Http Basic Authentication. 'Application' by default.
88
- # config.http_authentication_realm = 'Application'
89
-
90
- # It will change confirmation, password recovery and other workflows
91
- # to behave the same regardless if the e-mail provided was right or wrong.
92
- # Does not affect registerable.
93
- # config.paranoid = true
94
-
95
- # By default Devise will store the user in session. You can skip storage for
96
- # particular strategies by setting this option.
97
- # Notice that if you are skipping storage for all authentication paths, you
98
- # may want to disable generating routes to Devise's sessions controller by
99
- # passing skip: :sessions to `devise_for` in your config/routes.rb
100
- config.skip_session_storage = [:http_auth]
101
-
102
- # By default, Devise cleans up the CSRF token on authentication to
103
- # avoid CSRF token fixation attacks. This means that, when using AJAX
104
- # requests for sign in and sign up, you need to get a new CSRF token
105
- # from the server. You can disable this option at your own risk.
106
- # config.clean_up_csrf_token_on_authentication = true
107
-
108
- # When false, Devise will not attempt to reload routes on eager load.
109
- # This can reduce the time taken to boot the app but if your application
110
- # requires the Devise mappings to be loaded during boot time the application
111
- # won't boot properly.
112
- # config.reload_routes = true
113
-
114
- # ==> Configuration for :database_authenticatable
115
- # For bcrypt, this is the cost for hashing the password and defaults to 12. If
116
- # using other algorithms, it sets how many times you want the password to be hashed.
117
- # The number of stretches used for generating the hashed password are stored
118
- # with the hashed password. This allows you to change the stretches without
119
- # invalidating existing passwords.
120
- #
121
- # Limiting the stretches to just one in testing will increase the performance of
122
- # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
123
- # a value less than 10 in other environments. Note that, for bcrypt (the default
124
- # algorithm), the cost increases exponentially with the number of stretches (e.g.
125
- # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
126
- config.stretches = Rails.env.test? ? 1 : 12
127
-
128
- # Set up a pepper to generate the hashed password.
129
- # config.pepper = '8c4f31eaa01bedfc975c738b6e0492844f2e2f4d68229ebd206cc6d6752ea4dda7df27d34a958150f6f7ff57f647889376f846715242a8715651765d02acd086'
130
-
131
- # Send a notification to the original email when the user's email is changed.
132
- # config.send_email_changed_notification = false
133
-
134
- # Send a notification email when the user's password is changed.
135
- # config.send_password_change_notification = false
136
-
137
- # ==> Configuration for :confirmable
138
- # A period that the user is allowed to access the website even without
139
- # confirming their account. For instance, if set to 2.days, the user will be
140
- # able to access the website for two days without confirming their account,
141
- # access will be blocked just in the third day.
142
- # You can also set it to nil, which will allow the user to access the website
143
- # without confirming their account.
144
- # Default is 0.days, meaning the user cannot access the website without
145
- # confirming their account.
146
- # config.allow_unconfirmed_access_for = 2.days
147
-
148
- # A period that the user is allowed to confirm their account before their
149
- # token becomes invalid. For example, if set to 3.days, the user can confirm
150
- # their account within 3 days after the mail was sent, but on the fourth day
151
- # their account can't be confirmed with the token any more.
152
- # Default is nil, meaning there is no restriction on how long a user can take
153
- # before confirming their account.
154
- # config.confirm_within = 3.days
155
-
156
- # If true, requires any email changes to be confirmed (exactly the same way as
157
- # initial account confirmation) to be applied. Requires additional unconfirmed_email
158
- # db field (see migrations). Until confirmed, new email is stored in
159
- # unconfirmed_email column, and copied to email column on successful confirmation.
160
- config.reconfirmable = true
161
-
162
- # Defines which key will be used when confirming an account
163
- # config.confirmation_keys = [:email]
164
-
165
- # ==> Configuration for :rememberable
166
- # The time the user will be remembered without asking for credentials again.
167
- # config.remember_for = 2.weeks
168
-
169
- # Invalidates all the remember me tokens when the user signs out.
170
- config.expire_all_remember_me_on_sign_out = true
171
-
172
- # If true, extends the user's remember period when remembered via cookie.
173
- # config.extend_remember_period = false
174
-
175
- # Options to be passed to the created cookie. For instance, you can set
176
- # secure: true in order to force SSL only cookies.
177
- # config.rememberable_options = {}
178
-
179
- # ==> Configuration for :validatable
180
- # Range for password length.
181
- config.password_length = 6..128
182
-
183
- # Email regex used to validate email formats. It simply asserts that
184
- # one (and only one) @ exists in the given string. This is mainly
185
- # to give user feedback and not to assert the e-mail validity.
186
- config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
187
-
188
- # ==> Configuration for :timeoutable
189
- # The time you want to timeout the user session without activity. After this
190
- # time the user will be asked for credentials again. Default is 30 minutes.
191
- # config.timeout_in = 30.minutes
192
-
193
- # ==> Configuration for :lockable
194
- # Defines which strategy will be used to lock an account.
195
- # :failed_attempts = Locks an account after a number of failed attempts to sign in.
196
- # :none = No lock strategy. You should handle locking by yourself.
197
- # config.lock_strategy = :failed_attempts
198
-
199
- # Defines which key will be used when locking and unlocking an account
200
- # config.unlock_keys = [:email]
201
-
202
- # Defines which strategy will be used to unlock an account.
203
- # :email = Sends an unlock link to the user email
204
- # :time = Re-enables login after a certain amount of time (see :unlock_in below)
205
- # :both = Enables both strategies
206
- # :none = No unlock strategy. You should handle unlocking by yourself.
207
- # config.unlock_strategy = :both
208
-
209
- # Number of authentication tries before locking an account if lock_strategy
210
- # is failed attempts.
211
- # config.maximum_attempts = 20
212
-
213
- # Time interval to unlock the account if :time is enabled as unlock_strategy.
214
- # config.unlock_in = 1.hour
215
-
216
- # Warn on the last attempt before the account is locked.
217
- # config.last_attempt_warning = true
218
-
219
- # ==> Configuration for :recoverable
220
- #
221
- # Defines which key will be used when recovering the password for an account
222
- # config.reset_password_keys = [:email]
223
-
224
- # Time interval you can reset your password with a reset password key.
225
- # Don't put a too small interval or your users won't have the time to
226
- # change their passwords.
227
- config.reset_password_within = 6.hours
228
-
229
- # When set to false, does not sign a user in automatically after their password is
230
- # reset. Defaults to true, so a user is signed in automatically after a reset.
231
- # config.sign_in_after_reset_password = true
232
-
233
- # ==> Configuration for :encryptable
234
- # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
235
- # You can use :sha1, :sha512 or algorithms from others authentication tools as
236
- # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
237
- # for default behavior) and :restful_authentication_sha1 (then you should set
238
- # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
239
- #
240
- # Require the `devise-encryptable` gem when using anything other than bcrypt
241
- # config.encryptor = :sha512
242
-
243
- # ==> Scopes configuration
244
- # Turn scoped views on. Before rendering "sessions/new", it will first check for
245
- # "users/sessions/new". It's turned off by default because it's slower if you
246
- # are using only default views.
247
- # config.scoped_views = false
248
-
249
- # Configure the default scope given to Warden. By default it's the first
250
- # devise role declared in your routes (usually :user).
251
- # config.default_scope = :user
252
-
253
- # Set this configuration to false if you want /users/sign_out to sign out
254
- # only the current scope. By default, Devise signs out all scopes.
255
- # config.sign_out_all_scopes = true
256
-
257
- # ==> Navigation configuration
258
- # Lists the formats that should be treated as navigational. Formats like
259
- # :html should redirect to the sign in page when the user does not have
260
- # access, but formats like :xml or :json, should return 401.
261
- #
262
- # If you have any extra navigational formats, like :iphone or :mobile, you
263
- # should add them to the navigational formats lists.
264
- #
265
- # The "*/*" below is required to match Internet Explorer requests.
266
- # config.navigational_formats = ['*/*', :html, :turbo_stream]
267
-
268
- # The default HTTP method used to sign out a resource. Default is :delete.
269
- config.sign_out_via = :delete
270
-
271
- # ==> OmniAuth
272
- # Add a new OmniAuth provider. Check the wiki for more information on setting
273
- # up on your models and hooks.
274
- # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
275
-
276
- # ==> Warden configuration
277
- # If you want to use other strategies, that are not supported by Devise, or
278
- # change the failure app, you can configure them inside the config.warden block.
279
- #
280
- # config.warden do |manager|
281
- # manager.intercept_401 = false
282
- # manager.default_strategies(scope: :user).unshift :some_external_strategy
283
- # end
284
-
285
- # ==> Mountable engine configurations
286
- # When using Devise inside an engine, let's call it `MyEngine`, and this engine
287
- # is mountable, there are some extra configurations to be taken into account.
288
- # The following options are available, assuming the engine is mounted as:
289
- #
290
- # mount MyEngine, at: '/my_engine'
291
- #
292
- # The router that invoked `devise_for`, in the example above, would be:
293
- # config.router_name = :my_engine
294
- #
295
- # When using OmniAuth, Devise cannot automatically set OmniAuth path,
296
- # so you need to do it manually. For the users scope, it would be:
297
- # config.omniauth_path_prefix = '/my_engine/users/auth'
298
-
299
- # ==> Hotwire/Turbo configuration
300
- # When using Devise with Hotwire/Turbo, the http status for error responses
301
- # and some redirects must match the following. The default in Devise for existing
302
- # apps is `200 OK` and `302 Found respectively`, but new apps are generated with
303
- # these new defaults that match Hotwire/Turbo behavior.
304
- # Note: These might become the new default in future versions of Devise.
305
- # config.responder.error_status = :unprocessable_entity
306
- # config.responder.redirect_status = :see_other
307
-
308
- # ==> Configuration for :registerable
309
-
310
- # When set to false, does not sign a user in automatically after their password is
311
- # changed. Defaults to true, so a user is signed in automatically after changing a password.
312
- # config.sign_in_after_change_password = true
313
- end
314
-
315
-
316
- Devise.setup do |config|
317
-
318
- config.mailer = "Lesli::DeviseMailer"
319
-
320
- # Mount devise through Lesli engine
321
- config.router_name = :lesli
322
-
323
- # ==> Controller configuration
324
- # Configure the parent class to the devise controllers.
325
- config.parent_controller = "Lesli::ApplicationDeviseController"
326
-
327
- # The default HTTP method used to sign out a resource. Default is :delete.
328
- config.sign_out_via = :get
329
-
330
- # If 401 status code should be returned for AJAX requests. True by default.
331
- config.http_authenticatable_on_xhr = false
332
-
333
- # The "*/*" below is required to match Internet Explorer requests.
334
- config.navigational_formats = ["*/*", :html, :json]
335
- end
1
+ # # frozen_string_literal: true
2
+
3
+ # # Assuming you have not yet modified this file, each configuration option below
4
+ # # is set to its default value. Note that some are commented out while others
5
+ # # are not: uncommented lines are intended to protect your configuration from
6
+ # # breaking changes in upgrades (i.e., in the event that future versions of
7
+ # # Devise change the default values for those options).
8
+ # #
9
+ # # Use this hook to configure devise mailer, warden hooks and so forth.
10
+ # # Many of these configuration options can be set straight in your model.
11
+ # Devise.setup do |config|
12
+ # # The secret key used by Devise. Devise uses this key to generate
13
+ # # random tokens. Changing this key will render invalid all existing
14
+ # # confirmation, reset password and unlock tokens in the database.
15
+ # # Devise will use the `secret_key_base` as its `secret_key`
16
+ # # by default. You can change it below and use your own secret key.
17
+ # # config.secret_key = '418b0e734e2cf533487ad8ee828e01e6482c597dd99cc9b1a11c35ae40ac8cfb1d89a17474d013f7f4dc1b1b92ba793688ecd92134fdd4cf8c08912d30e2a2e4'
18
+
19
+ # # ==> Controller configuration
20
+ # # Configure the parent class to the devise controllers.
21
+ # # config.parent_controller = 'DeviseController'
22
+
23
+ # # ==> Mailer Configuration
24
+ # # Configure the e-mail address which will be shown in Devise::Mailer,
25
+ # # note that it will be overwritten if you use your own mailer class
26
+ # # with default "from" parameter.
27
+ # config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
28
+
29
+ # # Configure the class responsible to send e-mails.
30
+ # # config.mailer = 'Devise::Mailer'
31
+
32
+ # # Configure the parent class responsible to send e-mails.
33
+ # # config.parent_mailer = 'ActionMailer::Base'
34
+
35
+ # # ==> ORM configuration
36
+ # # Load and configure the ORM. Supports :active_record (default) and
37
+ # # :mongoid (bson_ext recommended) by default. Other ORMs may be
38
+ # # available as additional gems.
39
+ # require 'devise/orm/active_record'
40
+
41
+ # # ==> Configuration for any authentication mechanism
42
+ # # Configure which keys are used when authenticating a user. The default is
43
+ # # just :email. You can configure it to use [:username, :subdomain], so for
44
+ # # authenticating a user, both parameters are required. Remember that those
45
+ # # parameters are used only when authenticating and not when retrieving from
46
+ # # session. If you need permissions, you should implement that in a before filter.
47
+ # # You can also supply a hash where the value is a boolean determining whether
48
+ # # or not authentication should be aborted when the value is not present.
49
+ # # config.authentication_keys = [:email]
50
+
51
+ # # Configure parameters from the request object used for authentication. Each entry
52
+ # # given should be a request method and it will automatically be passed to the
53
+ # # find_for_authentication method and considered in your model lookup. For instance,
54
+ # # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
55
+ # # The same considerations mentioned for authentication_keys also apply to request_keys.
56
+ # # config.request_keys = []
57
+
58
+ # # Configure which authentication keys should be case-insensitive.
59
+ # # These keys will be downcased upon creating or modifying a user and when used
60
+ # # to authenticate or find a user. Default is :email.
61
+ # config.case_insensitive_keys = [:email]
62
+
63
+ # # Configure which authentication keys should have whitespace stripped.
64
+ # # These keys will have whitespace before and after removed upon creating or
65
+ # # modifying a user and when used to authenticate or find a user. Default is :email.
66
+ # config.strip_whitespace_keys = [:email]
67
+
68
+ # # Tell if authentication through request.params is enabled. True by default.
69
+ # # It can be set to an array that will enable params authentication only for the
70
+ # # given strategies, for example, `config.params_authenticatable = [:database]` will
71
+ # # enable it only for database (email + password) authentication.
72
+ # # config.params_authenticatable = true
73
+
74
+ # # Tell if authentication through HTTP Auth is enabled. False by default.
75
+ # # It can be set to an array that will enable http authentication only for the
76
+ # # given strategies, for example, `config.http_authenticatable = [:database]` will
77
+ # # enable it only for database authentication.
78
+ # # For API-only applications to support authentication "out-of-the-box", you will likely want to
79
+ # # enable this with :database unless you are using a custom strategy.
80
+ # # The supported strategies are:
81
+ # # :database = Support basic authentication with authentication key + password
82
+ # # config.http_authenticatable = false
83
+
84
+ # # If 401 status code should be returned for AJAX requests. True by default.
85
+ # # config.http_authenticatable_on_xhr = true
86
+
87
+ # # The realm used in Http Basic Authentication. 'Application' by default.
88
+ # # config.http_authentication_realm = 'Application'
89
+
90
+ # # It will change confirmation, password recovery and other workflows
91
+ # # to behave the same regardless if the e-mail provided was right or wrong.
92
+ # # Does not affect registerable.
93
+ # # config.paranoid = true
94
+
95
+ # # By default Devise will store the user in session. You can skip storage for
96
+ # # particular strategies by setting this option.
97
+ # # Notice that if you are skipping storage for all authentication paths, you
98
+ # # may want to disable generating routes to Devise's sessions controller by
99
+ # # passing skip: :sessions to `devise_for` in your config/routes.rb
100
+ # config.skip_session_storage = [:http_auth]
101
+
102
+ # # By default, Devise cleans up the CSRF token on authentication to
103
+ # # avoid CSRF token fixation attacks. This means that, when using AJAX
104
+ # # requests for sign in and sign up, you need to get a new CSRF token
105
+ # # from the server. You can disable this option at your own risk.
106
+ # # config.clean_up_csrf_token_on_authentication = true
107
+
108
+ # # When false, Devise will not attempt to reload routes on eager load.
109
+ # # This can reduce the time taken to boot the app but if your application
110
+ # # requires the Devise mappings to be loaded during boot time the application
111
+ # # won't boot properly.
112
+ # # config.reload_routes = true
113
+
114
+ # # ==> Configuration for :database_authenticatable
115
+ # # For bcrypt, this is the cost for hashing the password and defaults to 12. If
116
+ # # using other algorithms, it sets how many times you want the password to be hashed.
117
+ # # The number of stretches used for generating the hashed password are stored
118
+ # # with the hashed password. This allows you to change the stretches without
119
+ # # invalidating existing passwords.
120
+ # #
121
+ # # Limiting the stretches to just one in testing will increase the performance of
122
+ # # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
123
+ # # a value less than 10 in other environments. Note that, for bcrypt (the default
124
+ # # algorithm), the cost increases exponentially with the number of stretches (e.g.
125
+ # # a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
126
+ # config.stretches = Rails.env.test? ? 1 : 12
127
+
128
+ # # Set up a pepper to generate the hashed password.
129
+ # # config.pepper = '8c4f31eaa01bedfc975c738b6e0492844f2e2f4d68229ebd206cc6d6752ea4dda7df27d34a958150f6f7ff57f647889376f846715242a8715651765d02acd086'
130
+
131
+ # # Send a notification to the original email when the user's email is changed.
132
+ # # config.send_email_changed_notification = false
133
+
134
+ # # Send a notification email when the user's password is changed.
135
+ # # config.send_password_change_notification = false
136
+
137
+ # # ==> Configuration for :confirmable
138
+ # # A period that the user is allowed to access the website even without
139
+ # # confirming their account. For instance, if set to 2.days, the user will be
140
+ # # able to access the website for two days without confirming their account,
141
+ # # access will be blocked just in the third day.
142
+ # # You can also set it to nil, which will allow the user to access the website
143
+ # # without confirming their account.
144
+ # # Default is 0.days, meaning the user cannot access the website without
145
+ # # confirming their account.
146
+ # # config.allow_unconfirmed_access_for = 2.days
147
+
148
+ # # A period that the user is allowed to confirm their account before their
149
+ # # token becomes invalid. For example, if set to 3.days, the user can confirm
150
+ # # their account within 3 days after the mail was sent, but on the fourth day
151
+ # # their account can't be confirmed with the token any more.
152
+ # # Default is nil, meaning there is no restriction on how long a user can take
153
+ # # before confirming their account.
154
+ # # config.confirm_within = 3.days
155
+
156
+ # # If true, requires any email changes to be confirmed (exactly the same way as
157
+ # # initial account confirmation) to be applied. Requires additional unconfirmed_email
158
+ # # db field (see migrations). Until confirmed, new email is stored in
159
+ # # unconfirmed_email column, and copied to email column on successful confirmation.
160
+ # config.reconfirmable = true
161
+
162
+ # # Defines which key will be used when confirming an account
163
+ # # config.confirmation_keys = [:email]
164
+
165
+ # # ==> Configuration for :rememberable
166
+ # # The time the user will be remembered without asking for credentials again.
167
+ # # config.remember_for = 2.weeks
168
+
169
+ # # Invalidates all the remember me tokens when the user signs out.
170
+ # config.expire_all_remember_me_on_sign_out = true
171
+
172
+ # # If true, extends the user's remember period when remembered via cookie.
173
+ # # config.extend_remember_period = false
174
+
175
+ # # Options to be passed to the created cookie. For instance, you can set
176
+ # # secure: true in order to force SSL only cookies.
177
+ # # config.rememberable_options = {}
178
+
179
+ # # ==> Configuration for :validatable
180
+ # # Range for password length.
181
+ # config.password_length = 6..128
182
+
183
+ # # Email regex used to validate email formats. It simply asserts that
184
+ # # one (and only one) @ exists in the given string. This is mainly
185
+ # # to give user feedback and not to assert the e-mail validity.
186
+ # config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
187
+
188
+ # # ==> Configuration for :timeoutable
189
+ # # The time you want to timeout the user session without activity. After this
190
+ # # time the user will be asked for credentials again. Default is 30 minutes.
191
+ # # config.timeout_in = 30.minutes
192
+
193
+ # # ==> Configuration for :lockable
194
+ # # Defines which strategy will be used to lock an account.
195
+ # # :failed_attempts = Locks an account after a number of failed attempts to sign in.
196
+ # # :none = No lock strategy. You should handle locking by yourself.
197
+ # # config.lock_strategy = :failed_attempts
198
+
199
+ # # Defines which key will be used when locking and unlocking an account
200
+ # # config.unlock_keys = [:email]
201
+
202
+ # # Defines which strategy will be used to unlock an account.
203
+ # # :email = Sends an unlock link to the user email
204
+ # # :time = Re-enables login after a certain amount of time (see :unlock_in below)
205
+ # # :both = Enables both strategies
206
+ # # :none = No unlock strategy. You should handle unlocking by yourself.
207
+ # # config.unlock_strategy = :both
208
+
209
+ # # Number of authentication tries before locking an account if lock_strategy
210
+ # # is failed attempts.
211
+ # # config.maximum_attempts = 20
212
+
213
+ # # Time interval to unlock the account if :time is enabled as unlock_strategy.
214
+ # # config.unlock_in = 1.hour
215
+
216
+ # # Warn on the last attempt before the account is locked.
217
+ # # config.last_attempt_warning = true
218
+
219
+ # # ==> Configuration for :recoverable
220
+ # #
221
+ # # Defines which key will be used when recovering the password for an account
222
+ # # config.reset_password_keys = [:email]
223
+
224
+ # # Time interval you can reset your password with a reset password key.
225
+ # # Don't put a too small interval or your users won't have the time to
226
+ # # change their passwords.
227
+ # config.reset_password_within = 6.hours
228
+
229
+ # # When set to false, does not sign a user in automatically after their password is
230
+ # # reset. Defaults to true, so a user is signed in automatically after a reset.
231
+ # # config.sign_in_after_reset_password = true
232
+
233
+ # # ==> Configuration for :encryptable
234
+ # # Allow you to use another hashing or encryption algorithm besides bcrypt (default).
235
+ # # You can use :sha1, :sha512 or algorithms from others authentication tools as
236
+ # # :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
237
+ # # for default behavior) and :restful_authentication_sha1 (then you should set
238
+ # # stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
239
+ # #
240
+ # # Require the `devise-encryptable` gem when using anything other than bcrypt
241
+ # # config.encryptor = :sha512
242
+
243
+ # # ==> Scopes configuration
244
+ # # Turn scoped views on. Before rendering "sessions/new", it will first check for
245
+ # # "users/sessions/new". It's turned off by default because it's slower if you
246
+ # # are using only default views.
247
+ # # config.scoped_views = false
248
+
249
+ # # Configure the default scope given to Warden. By default it's the first
250
+ # # devise role declared in your routes (usually :user).
251
+ # # config.default_scope = :user
252
+
253
+ # # Set this configuration to false if you want /users/sign_out to sign out
254
+ # # only the current scope. By default, Devise signs out all scopes.
255
+ # # config.sign_out_all_scopes = true
256
+
257
+ # # ==> Navigation configuration
258
+ # # Lists the formats that should be treated as navigational. Formats like
259
+ # # :html should redirect to the sign in page when the user does not have
260
+ # # access, but formats like :xml or :json, should return 401.
261
+ # #
262
+ # # If you have any extra navigational formats, like :iphone or :mobile, you
263
+ # # should add them to the navigational formats lists.
264
+ # #
265
+ # # The "*/*" below is required to match Internet Explorer requests.
266
+ # # config.navigational_formats = ['*/*', :html, :turbo_stream]
267
+
268
+ # # The default HTTP method used to sign out a resource. Default is :delete.
269
+ # config.sign_out_via = :delete
270
+
271
+ # # ==> OmniAuth
272
+ # # Add a new OmniAuth provider. Check the wiki for more information on setting
273
+ # # up on your models and hooks.
274
+ # # config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
275
+
276
+ # # ==> Warden configuration
277
+ # # If you want to use other strategies, that are not supported by Devise, or
278
+ # # change the failure app, you can configure them inside the config.warden block.
279
+ # #
280
+ # # config.warden do |manager|
281
+ # # manager.intercept_401 = false
282
+ # # manager.default_strategies(scope: :user).unshift :some_external_strategy
283
+ # # end
284
+
285
+ # # ==> Mountable engine configurations
286
+ # # When using Devise inside an engine, let's call it `MyEngine`, and this engine
287
+ # # is mountable, there are some extra configurations to be taken into account.
288
+ # # The following options are available, assuming the engine is mounted as:
289
+ # #
290
+ # # mount MyEngine, at: '/my_engine'
291
+ # #
292
+ # # The router that invoked `devise_for`, in the example above, would be:
293
+ # # config.router_name = :my_engine
294
+ # #
295
+ # # When using OmniAuth, Devise cannot automatically set OmniAuth path,
296
+ # # so you need to do it manually. For the users scope, it would be:
297
+ # # config.omniauth_path_prefix = '/my_engine/users/auth'
298
+
299
+ # # ==> Hotwire/Turbo configuration
300
+ # # When using Devise with Hotwire/Turbo, the http status for error responses
301
+ # # and some redirects must match the following. The default in Devise for existing
302
+ # # apps is `200 OK` and `302 Found respectively`, but new apps are generated with
303
+ # # these new defaults that match Hotwire/Turbo behavior.
304
+ # # Note: These might become the new default in future versions of Devise.
305
+ # # config.responder.error_status = :unprocessable_entity
306
+ # # config.responder.redirect_status = :see_other
307
+
308
+ # # ==> Configuration for :registerable
309
+
310
+ # # When set to false, does not sign a user in automatically after their password is
311
+ # # changed. Defaults to true, so a user is signed in automatically after changing a password.
312
+ # # config.sign_in_after_change_password = true
313
+ # end
314
+
315
+
316
+ # Devise.setup do |config|
317
+
318
+ # config.mailer = "Lesli::DeviseMailer"
319
+
320
+ # # Mount devise through Lesli engine
321
+ # config.router_name = :lesli_shield
322
+
323
+ # # ==> Controller configuration
324
+ # # Configure the parent class to the devise controllers.
325
+ # config.parent_controller = "Lesli::ApplicationDeviseController"
326
+
327
+ # # The default HTTP method used to sign out a resource. Default is :delete.
328
+ # config.sign_out_via = :get
329
+
330
+ # # If 401 status code should be returned for AJAX requests. True by default.
331
+ # config.http_authenticatable_on_xhr = false
332
+
333
+ # # The "*/*" below is required to match Internet Explorer requests.
334
+ # config.navigational_formats = [:html, :json]
335
+ # end
336
336