fat_free_crm 0.18.2 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fat_free_crm might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +61 -160
- data/.travis.yml +27 -11
- data/CHANGELOG.md +40 -24
- data/CONTRIBUTORS.md +1 -0
- data/Dockerfile +45 -14
- data/Gemfile +16 -10
- data/Gemfile.lock +230 -222
- data/Procfile +1 -1
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/app/assets/stylesheets/common.scss +1 -1
- data/app/controllers/admin/application_controller.rb +1 -1
- data/app/controllers/admin/field_groups_controller.rb +1 -3
- data/app/controllers/admin/tags_controller.rb +1 -3
- data/app/controllers/admin/users_controller.rb +5 -8
- data/app/controllers/application_controller.rb +11 -45
- data/app/controllers/comments_controller.rb +2 -5
- data/{config/initializers/authlogic.rb → app/controllers/confirmations_controller.rb} +4 -2
- data/app/controllers/emails_controller.rb +0 -2
- data/app/controllers/entities/accounts_controller.rb +1 -3
- data/app/controllers/entities/campaigns_controller.rb +1 -3
- data/app/controllers/entities/contacts_controller.rb +4 -24
- data/app/controllers/entities/leads_controller.rb +7 -10
- data/app/controllers/entities/opportunities_controller.rb +4 -14
- data/app/controllers/entities_controller.rb +21 -7
- data/app/controllers/home_controller.rb +2 -4
- data/app/controllers/passwords_controller.rb +3 -59
- data/{spec/features/support/maintain_sessions.rb → app/controllers/registrations_controller.rb} +12 -5
- data/{lib/development_tasks/gem.rake → app/controllers/sessions_controller.rb} +6 -6
- data/app/controllers/tasks_controller.rb +8 -17
- data/app/controllers/users_controller.rb +8 -29
- data/app/helpers/admin/users_helper.rb +1 -1
- data/app/helpers/application_helper.rb +27 -32
- data/app/helpers/campaigns_helper.rb +1 -1
- data/app/helpers/contacts_helper.rb +1 -3
- data/app/helpers/opportunities_helper.rb +4 -12
- data/app/helpers/tasks_helper.rb +1 -1
- data/app/helpers/users_helper.rb +1 -3
- data/{config/initializers/paper_trail.rb → app/mailers/devise_mailer.rb} +5 -1
- data/app/mailers/user_mailer.rb +0 -9
- data/app/models/entities/account.rb +10 -10
- data/app/models/entities/campaign.rb +4 -6
- data/app/models/entities/contact.rb +24 -12
- data/app/models/entities/lead.rb +7 -7
- data/app/models/entities/opportunity.rb +7 -9
- data/app/models/fields/custom_field.rb +1 -0
- data/app/models/fields/custom_field_date_pair.rb +2 -0
- data/app/models/fields/field.rb +1 -3
- data/app/models/list.rb +1 -1
- data/app/models/observers/entity_observer.rb +3 -7
- data/app/models/observers/lead_observer.rb +2 -4
- data/app/models/observers/opportunity_observer.rb +2 -4
- data/app/models/observers/task_observer.rb +1 -1
- data/app/models/polymorphic/email.rb +2 -2
- data/app/models/polymorphic/task.rb +13 -9
- data/app/models/polymorphic/version.rb +3 -2
- data/app/models/setting.rb +2 -0
- data/app/models/users/permission.rb +3 -3
- data/app/models/users/preference.rb +2 -1
- data/app/models/users/user.rb +67 -42
- data/app/views/accounts/_top_section.html.haml +1 -1
- data/app/views/accounts/edit.js.haml +1 -1
- data/app/views/accounts/update.js.haml +2 -2
- data/app/views/admin/users/_user.html.haml +4 -4
- data/app/views/contacts/_index_brief.html.haml +1 -1
- data/app/views/contacts/_index_full.html.haml +1 -1
- data/app/views/contacts/_index_long.html.haml +1 -1
- data/app/views/devise/confirmations/new.html.haml +9 -0
- data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
- data/app/views/devise/mailer/password_change.html.haml +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/devise/passwords/edit.html.haml +18 -0
- data/app/views/devise/passwords/new.html.haml +10 -0
- data/app/views/devise/registrations/new.html.haml +21 -0
- data/app/views/devise/sessions/new.html.haml +32 -0
- data/app/views/layouts/_about.html.haml +5 -5
- data/app/views/layouts/_header.html.haml +3 -3
- data/app/views/layouts/admin/_header.html.haml +1 -1
- data/app/views/shared/_address.html.haml +5 -5
- data/app/views/shared/_paginate_with_per_page.html.haml +1 -0
- data/app/views/users/_avatar.html.haml +1 -1
- data/bin/bundle +1 -1
- data/bin/rails +1 -1
- data/bin/setup +38 -0
- data/bin/update +33 -0
- data/bin/yarn +13 -0
- data/config/application.rb +8 -6
- data/config/boot.rb +1 -1
- data/config/brakeman.ignore +2 -2
- data/config/database.postgres.docker.yml +5 -5
- data/config/environment.rb +1 -1
- data/config/environments/development.rb +1 -0
- data/config/environments/test.rb +7 -0
- data/config/initializers/action_mailer.rb +1 -3
- data/config/initializers/application_controller_renderer.rb +9 -0
- data/config/initializers/assets.rb +6 -11
- data/config/initializers/backtrace_silencers.rb +0 -6
- data/config/initializers/content_security_policy.rb +26 -0
- data/config/initializers/cookies_serializer.rb +3 -6
- data/config/initializers/devise.rb +289 -0
- data/config/initializers/filter_parameter_logging.rb +0 -5
- data/config/initializers/gravatar.rb +0 -1
- data/config/initializers/inflections.rb +0 -6
- data/config/initializers/mime_types.rb +1 -9
- data/config/initializers/new_framework_defaults_5_2.rb +40 -0
- data/config/initializers/relative_url_root.rb +1 -3
- data/config/initializers/session_store.rb +1 -3
- data/config/initializers/wrap_parameters.rb +4 -9
- data/config/locales/fat_free_crm.en-GB.yml +5 -5
- data/config/locales/fat_free_crm.en-US.yml +5 -5
- data/config/locales/fat_free_crm.fr.yml +1 -1
- data/config/locales/fat_free_crm.ru.yml +1 -0
- data/config/routes.rb +20 -9
- data/db/demo/users.yml +62 -81
- data/db/migrate/20100928030620_remove_uuid.rb +1 -2
- data/db/migrate/20120316045804_activities_to_versions.rb +1 -0
- data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +1 -0
- data/db/migrate/20180107082701_authlogic_to_devise.rb +58 -0
- data/db/schema.rb +48 -43
- data/docker-compose.yml +10 -0
- data/fat_free_crm.gemspec +11 -13
- data/lib/development_tasks/license.rake +2 -2
- data/lib/fat_free_crm/callback.rb +2 -2
- data/lib/fat_free_crm/comment_extensions.rb +2 -4
- data/lib/fat_free_crm/core_ext/string.rb +1 -1
- data/lib/fat_free_crm/engine.rb +1 -1
- data/lib/fat_free_crm/errors.rb +1 -1
- data/lib/fat_free_crm/export_csv.rb +1 -0
- data/lib/fat_free_crm/exportable.rb +1 -1
- data/lib/fat_free_crm/fields.rb +1 -1
- data/lib/fat_free_crm/gem_dependencies.rb +1 -1
- data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +1 -3
- data/lib/fat_free_crm/i18n.rb +2 -2
- data/lib/fat_free_crm/mail_processor/base.rb +4 -10
- data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -15
- data/lib/fat_free_crm/permissions.rb +7 -4
- data/lib/fat_free_crm/sortable.rb +1 -1
- data/lib/fat_free_crm/tabs.rb +2 -2
- data/lib/fat_free_crm/version.rb +2 -2
- data/lib/gravatar_image_tag.rb +7 -8
- data/lib/missing_translation_detector.rb +1 -0
- data/lib/tasks/ffcrm/missing_translations.rake +1 -0
- data/lib/tasks/ffcrm/setup.rake +10 -1
- data/lib/tasks/ffcrm/update_data.rake +2 -2
- data/script/rails +2 -2
- data/spec/controllers/admin/users_controller_spec.rb +0 -56
- data/spec/controllers/comments_controller_spec.rb +6 -6
- data/spec/controllers/entities/campaigns_controller_spec.rb +1 -1
- data/spec/controllers/entities/contacts_controller_spec.rb +2 -1
- data/spec/controllers/entities/leads_controller_spec.rb +2 -2
- data/spec/controllers/entities/opportunities_controller_spec.rb +1 -1
- data/spec/controllers/entities_controller_spec.rb +5 -0
- data/spec/controllers/home_controller_spec.rb +5 -5
- data/spec/controllers/tasks_controller_spec.rb +6 -4
- data/spec/controllers/users_controller_spec.rb +28 -98
- data/spec/factories/account_factories.rb +5 -5
- data/spec/factories/campaign_factories.rb +3 -3
- data/spec/factories/contact_factories.rb +8 -8
- data/spec/factories/field_factories.rb +4 -3
- data/spec/factories/lead_factories.rb +5 -5
- data/spec/factories/list_factories.rb +2 -2
- data/spec/factories/opportunity_factories.rb +3 -3
- data/spec/factories/setting_factories.rb +2 -2
- data/spec/factories/shared_factories.rb +11 -9
- data/spec/factories/task_factories.rb +7 -7
- data/spec/factories/user_factories.rb +16 -19
- data/spec/features/admin/groups_spec.rb +1 -1
- data/spec/features/admin/users_spec.rb +3 -1
- data/spec/features/campaigns_spec.rb +1 -1
- data/spec/features/contacts_spec.rb +1 -1
- data/spec/features/dashboard_spec.rb +1 -1
- data/spec/features/devise/sign_in_spec.rb +58 -0
- data/spec/features/devise/sign_up_spec.rb +36 -0
- data/spec/features/leads_spec.rb +1 -1
- data/spec/features/opportunities_overview_spec.rb +1 -1
- data/spec/features/opportunities_spec.rb +3 -3
- data/spec/features/support/browser.rb +2 -1
- data/spec/features/tasks_spec.rb +1 -1
- data/spec/helpers/admin/field_groups_helper_spec.rb +1 -1
- data/spec/helpers/users_helper_spec.rb +4 -4
- data/spec/lib/comment_extensions_spec.rb +10 -4
- data/spec/lib/errors_spec.rb +2 -2
- data/spec/lib/mail_processor/dropbox_spec.rb +1 -1
- data/spec/lib/mail_processor/sample_emails/dropbox.rb +8 -8
- data/spec/lib/permissions_spec.rb +8 -3
- data/spec/mailers/devise_mailer_spec.rb +35 -0
- data/spec/mailers/user_mailer_spec.rb +0 -26
- data/spec/models/entities/account_spec.rb +27 -0
- data/spec/models/entities/contact_spec.rb +96 -1
- data/spec/models/fields/custom_field_date_pair_spec.rb +4 -2
- data/spec/models/fields/custom_field_spec.rb +4 -2
- data/spec/models/observers/entity_observer_spec.rb +1 -1
- data/spec/models/polymorphic/version_spec.rb +7 -7
- data/spec/models/users/user_spec.rb +22 -26
- data/spec/routing/users_routing_spec.rb +30 -8
- data/spec/shared/controllers.rb +3 -9
- data/spec/spec_helper.rb +10 -2
- data/spec/support/assert_select.rb +1 -0
- data/spec/support/devise_helpers.rb +28 -0
- data/spec/{features/support/helpers.rb → support/feature_helpers.rb} +10 -10
- data/spec/support/macros.rb +4 -1
- data/spec/views/contacts/update.js.haml_spec.rb +1 -1
- data/spec/views/opportunities/update.js.haml_spec.rb +1 -1
- data/vendor/gems/ransack_ui-1.3.4/.gitignore +17 -0
- data/vendor/gems/ransack_ui-1.3.4/Gemfile +7 -0
- data/vendor/gems/ransack_ui-1.3.4/LICENSE.txt +22 -0
- data/vendor/gems/ransack_ui-1.3.4/README.md +57 -0
- data/vendor/gems/ransack_ui-1.3.4/Rakefile +1 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/images/ransack_ui/calendar.png +0 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/images/ransack_ui/delete.png +0 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack/predicates.js.coffee +41 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_bootstrap/button_group_select.js.coffee +26 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_bootstrap/index.js.coffee +2 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_jquery/index.js +2 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_jquery/search_form.js.coffee.erb +499 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/stylesheets/ransack_ui_bootstrap/index.css +3 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/stylesheets/ransack_ui_bootstrap/search.css.scss +41 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_condition_fields.html.erb +15 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_grouping_fields.html.erb +16 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_search.html.erb +29 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_sort_fields.html.erb +4 -0
- data/vendor/gems/ransack_ui-1.3.4/config/locales/en.yml +24 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui.rb +9 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/adapters/active_record.rb +6 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/adapters/active_record/base.rb +46 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/controller_helpers.rb +18 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/rails/engine.rb +21 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/adapters/active_record/base.rb +47 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/configuration.rb +15 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/context.rb +9 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/helpers/form_builder.rb +262 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/attribute.rb +13 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/condition.rb +13 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/grouping.rb +20 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/version.rb +3 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/view_helpers.rb +30 -0
- data/vendor/gems/ransack_ui-1.3.4/ransack_ui.gemspec +23 -0
- metadata +79 -67
- data/app/controllers/authentications_controller.rb +0 -53
- data/app/models/users/authentication.rb +0 -56
- data/app/views/authentications/new.html.haml +0 -19
- data/app/views/passwords/edit.html.haml +0 -15
- data/app/views/passwords/new.html.haml +0 -10
- data/app/views/user_mailer/password_reset_instructions.html.haml +0 -6
- data/app/views/users/new.html.haml +0 -19
- data/spec/controllers/authentications_controller_spec.rb +0 -150
- data/spec/controllers/passwords_controller_spec.rb +0 -32
- data/spec/models/users/authentication_spec.rb +0 -19
- data/spec/support/auth_macros.rb +0 -49
- data/spec/views/authentications/new.haml_spec.rb +0 -31
@@ -22,6 +22,7 @@ if defined?(FatFreeCRM::Application)
|
|
22
22
|
config.action_controller.perform_caching = false
|
23
23
|
|
24
24
|
config.action_mailer.delivery_method = :file
|
25
|
+
config.action_mailer.default_url_options = { host: 'localhost:3000' }
|
25
26
|
|
26
27
|
# Don't care if the mailer can't send
|
27
28
|
config.action_mailer.raise_delivery_errors = false
|
data/config/environments/test.rb
CHANGED
@@ -45,6 +45,13 @@ if defined?(FatFreeCRM::Application)
|
|
45
45
|
|
46
46
|
# Print deprecation notices to the stderr
|
47
47
|
config.active_support.deprecation = :stderr
|
48
|
+
|
49
|
+
# Store uploaded files on the local file system in a temporary directory
|
50
|
+
config.active_storage.service = :test
|
51
|
+
|
52
|
+
config.action_mailer.perform_caching = false
|
53
|
+
# Raises error for missing translations
|
54
|
+
# config.action_view.raise_on_missing_translations = true
|
48
55
|
end
|
49
56
|
|
50
57
|
# Optionally load 'awesome_print' for debugging in development mode.
|
@@ -13,9 +13,7 @@ unless Rails.env.test?
|
|
13
13
|
|
14
14
|
smtp_settings = Setting.smtp || {}
|
15
15
|
|
16
|
-
if smtp_settings["address"].present?
|
17
|
-
Rails.application.config.action_mailer.smtp_settings = smtp_settings.symbolize_keys
|
18
|
-
end
|
16
|
+
Rails.application.config.action_mailer.smtp_settings = smtp_settings.symbolize_keys if smtp_settings["address"].present?
|
19
17
|
|
20
18
|
if (host = Setting.host).present?
|
21
19
|
(Rails.application.routes.default_url_options ||= {})[:host] = host.gsub('http://', '')
|
@@ -1,21 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
4
|
-
#
|
5
|
-
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
|
-
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
|
-
#------------------------------------------------------------------------------
|
8
3
|
# Be sure to restart your server when you modify this file.
|
9
4
|
|
10
5
|
# Version of your assets, change this if you want to expire all your assets.
|
11
6
|
Rails.application.config.assets.version = '1.0'
|
12
7
|
|
13
|
-
# Add additional assets to the asset load path
|
8
|
+
# Add additional assets to the asset load path.
|
14
9
|
# Rails.application.config.assets.paths << Emoji.images_path
|
10
|
+
# Add Yarn node_modules folder to the asset load path.
|
11
|
+
Rails.application.config.assets.paths << Rails.root.join('node_modules')
|
15
12
|
|
16
13
|
# Precompile additional assets.
|
17
|
-
# application.js, application.css, and all non-JS/CSS in app/assets
|
18
|
-
|
19
|
-
|
20
|
-
# Don't initialize Rails environment
|
21
|
-
Rails.application.config.assets.initialize_on_precompile = false
|
14
|
+
# application.js, application.css, and all non-JS/CSS in the app/assets
|
15
|
+
# folder are already added.
|
16
|
+
Rails.application.config.assets.precompile += %w[print.css]
|
@@ -1,10 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
4
|
-
#
|
5
|
-
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
|
-
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
|
-
#------------------------------------------------------------------------------
|
8
2
|
# Be sure to restart your server when you modify this file.
|
9
3
|
|
10
4
|
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Be sure to restart your server when you modify this file.
|
3
|
+
|
4
|
+
# Define an application-wide content security policy
|
5
|
+
# For further information see the following documentation
|
6
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
7
|
+
|
8
|
+
# Rails.application.config.content_security_policy do |policy|
|
9
|
+
# policy.default_src :self, :https
|
10
|
+
# policy.font_src :self, :https, :data
|
11
|
+
# policy.img_src :self, :https, :data
|
12
|
+
# policy.object_src :none
|
13
|
+
# policy.script_src :self, :https
|
14
|
+
# policy.style_src :self, :https
|
15
|
+
|
16
|
+
# # Specify URI for violation reports
|
17
|
+
# # policy.report_uri "/csp-violation-report-endpoint"
|
18
|
+
# end
|
19
|
+
|
20
|
+
# If you are using UJS then enable automatic nonce generation
|
21
|
+
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
22
|
+
|
23
|
+
# Report CSP violations to a specified URI
|
24
|
+
# For further information see the following documentation:
|
25
|
+
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
26
|
+
# Rails.application.config.content_security_policy_report_only = true
|
@@ -1,10 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
4
|
-
#
|
5
|
-
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
|
-
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
|
-
#------------------------------------------------------------------------------
|
8
3
|
# Be sure to restart your server when you modify this file.
|
9
4
|
|
10
|
-
|
5
|
+
# Specify a serializer for the signed and encrypted cookie jars.
|
6
|
+
# Valid options are :json, :marshal, and :hybrid.
|
7
|
+
Rails.application.config.action_dispatch.cookies_serializer = :json
|
@@ -0,0 +1,289 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
4
|
+
#
|
5
|
+
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
|
+
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
|
+
#------------------------------------------------------------------------------
|
8
|
+
require 'devise-encryptable'
|
9
|
+
|
10
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
11
|
+
# Many of these configuration options can be set straight in your model.
|
12
|
+
Devise.setup do |config|
|
13
|
+
# The secret key used by Devise. Devise uses this key to generate
|
14
|
+
# random tokens. Changing this key will render invalid all existing
|
15
|
+
# confirmation, reset password and unlock tokens in the database.
|
16
|
+
# Devise will use the `secret_key_base` as its `secret_key`
|
17
|
+
# by default. You can change it below and use your own secret key.
|
18
|
+
# config.secret_key = SecureRandom.hex(64)
|
19
|
+
|
20
|
+
# ==> Mailer Configuration
|
21
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
22
|
+
# note that it will be overwritten if you use your own mailer class
|
23
|
+
# with default "from" parameter.
|
24
|
+
config.mailer_sender = 'noreply@fatfreecrm.com'
|
25
|
+
|
26
|
+
# Configure the class responsible to send e-mails.
|
27
|
+
config.mailer = 'DeviseMailer'
|
28
|
+
|
29
|
+
# Configure the parent class responsible to send e-mails.
|
30
|
+
# config.parent_mailer = 'ActionMailer::Base'
|
31
|
+
|
32
|
+
# ==> ORM configuration
|
33
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
34
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
35
|
+
# available as additional gems.
|
36
|
+
require 'devise/orm/active_record'
|
37
|
+
|
38
|
+
# ==> Configuration for any authentication mechanism
|
39
|
+
# Configure which keys are used when authenticating a user. The default is
|
40
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
41
|
+
# authenticating a user, both parameters are required. Remember that those
|
42
|
+
# parameters are used only when authenticating and not when retrieving from
|
43
|
+
# session. If you need permissions, you should implement that in a before filter.
|
44
|
+
# You can also supply a hash where the value is a boolean determining whether
|
45
|
+
# or not authentication should be aborted when the value is not present.
|
46
|
+
# config.authentication_keys = [:email]
|
47
|
+
|
48
|
+
# Configure parameters from the request object used for authentication. Each entry
|
49
|
+
# given should be a request method and it will automatically be passed to the
|
50
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
51
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
52
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
53
|
+
# config.request_keys = []
|
54
|
+
|
55
|
+
# Configure which authentication keys should be case-insensitive.
|
56
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
57
|
+
# to authenticate or find a user. Default is :email.
|
58
|
+
config.case_insensitive_keys = [:email]
|
59
|
+
|
60
|
+
# Configure which authentication keys should have whitespace stripped.
|
61
|
+
# These keys will have whitespace before and after removed upon creating or
|
62
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
63
|
+
config.strip_whitespace_keys = [:email]
|
64
|
+
|
65
|
+
# Tell if authentication through request.params is enabled. True by default.
|
66
|
+
# It can be set to an array that will enable params authentication only for the
|
67
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
68
|
+
# enable it only for database (email + password) authentication.
|
69
|
+
# config.params_authenticatable = true
|
70
|
+
|
71
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
72
|
+
# It can be set to an array that will enable http authentication only for the
|
73
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
74
|
+
# enable it only for database authentication. The supported strategies are:
|
75
|
+
# :database = Support basic authentication with authentication key + password
|
76
|
+
# config.http_authenticatable = false
|
77
|
+
|
78
|
+
# If 401 status code should be returned for AJAX requests. True by default.
|
79
|
+
# config.http_authenticatable_on_xhr = true
|
80
|
+
|
81
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
82
|
+
# config.http_authentication_realm = 'Application'
|
83
|
+
|
84
|
+
# It will change confirmation, password recovery and other workflows
|
85
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
86
|
+
# Does not affect registerable.
|
87
|
+
# config.paranoid = true
|
88
|
+
|
89
|
+
# By default Devise will store the user in session. You can skip storage for
|
90
|
+
# particular strategies by setting this option.
|
91
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
92
|
+
# may want to disable generating routes to Devise's sessions controller by
|
93
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
94
|
+
config.skip_session_storage = [:http_auth]
|
95
|
+
|
96
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
97
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
98
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
99
|
+
# from the server. You can disable this option at your own risk.
|
100
|
+
# config.clean_up_csrf_token_on_authentication = true
|
101
|
+
|
102
|
+
# When false, Devise will not attempt to reload routes on eager load.
|
103
|
+
# This can reduce the time taken to boot the app but if your application
|
104
|
+
# requires the Devise mappings to be loaded during boot time the application
|
105
|
+
# won't boot properly.
|
106
|
+
# config.reload_routes = true
|
107
|
+
|
108
|
+
# ==> Configuration for :database_authenticatable
|
109
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
|
110
|
+
# using other algorithms, it sets how many times you want the password to be hashed.
|
111
|
+
#
|
112
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
113
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
114
|
+
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
115
|
+
# algorithm), the cost increases exponentially with the number of stretches (e.g.
|
116
|
+
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
117
|
+
# config.stretches = Rails.env.test? ? 1 : 11 # SEE BELOW
|
118
|
+
|
119
|
+
# Set up a pepper to generate the hashed password.
|
120
|
+
# config.pepper = SecureRandom.hex(64)
|
121
|
+
|
122
|
+
# Send a notification to the original email when the user's email is changed.
|
123
|
+
# config.send_email_changed_notification = false
|
124
|
+
|
125
|
+
# Send a notification email when the user's password is changed.
|
126
|
+
# config.send_password_change_notification = false
|
127
|
+
|
128
|
+
# ==> Configuration for :confirmable
|
129
|
+
# A period that the user is allowed to access the website even without
|
130
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
131
|
+
# able to access the website for two days without confirming their account,
|
132
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
133
|
+
# the user cannot access the website without confirming their account.
|
134
|
+
# config.allow_unconfirmed_access_for = 2.days
|
135
|
+
|
136
|
+
# A period that the user is allowed to confirm their account before their
|
137
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
138
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
139
|
+
# their account can't be confirmed with the token any more.
|
140
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
141
|
+
# before confirming their account.
|
142
|
+
# config.confirm_within = 3.days
|
143
|
+
|
144
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
145
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
146
|
+
# db field (see migrations). Until confirmed, new email is stored in
|
147
|
+
# unconfirmed_email column, and copied to email column on successful confirmation.
|
148
|
+
config.reconfirmable = true
|
149
|
+
|
150
|
+
# Defines which key will be used when confirming an account
|
151
|
+
# config.confirmation_keys = [:email]
|
152
|
+
|
153
|
+
# ==> Configuration for :rememberable
|
154
|
+
# The time the user will be remembered without asking for credentials again.
|
155
|
+
# config.remember_for = 2.weeks
|
156
|
+
|
157
|
+
# Invalidates all the remember me tokens when the user signs out.
|
158
|
+
config.expire_all_remember_me_on_sign_out = true
|
159
|
+
|
160
|
+
# If true, extends the user's remember period when remembered via cookie.
|
161
|
+
# config.extend_remember_period = false
|
162
|
+
|
163
|
+
# Options to be passed to the created cookie. For instance, you can set
|
164
|
+
# secure: true in order to force SSL only cookies.
|
165
|
+
# config.rememberable_options = {}
|
166
|
+
|
167
|
+
# ==> Configuration for :validatable
|
168
|
+
# Range for password length.
|
169
|
+
config.password_length = 8..128
|
170
|
+
|
171
|
+
# Email regex used to validate email formats. It simply asserts that
|
172
|
+
# one (and only one) @ exists in the given string. This is mainly
|
173
|
+
# to give user feedback and not to assert the e-mail validity.
|
174
|
+
# config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
|
175
|
+
|
176
|
+
# ==> Configuration for :timeoutable
|
177
|
+
# The time you want to timeout the user session without activity. After this
|
178
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
179
|
+
# config.timeout_in = 30.minutes
|
180
|
+
|
181
|
+
# ==> Configuration for :lockable
|
182
|
+
# Defines which strategy will be used to lock an account.
|
183
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
184
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
185
|
+
# config.lock_strategy = :failed_attempts
|
186
|
+
|
187
|
+
# Defines which key will be used when locking and unlocking an account
|
188
|
+
# config.unlock_keys = [:email]
|
189
|
+
|
190
|
+
# Defines which strategy will be used to unlock an account.
|
191
|
+
# :email = Sends an unlock link to the user email
|
192
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
193
|
+
# :both = Enables both strategies
|
194
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
195
|
+
# config.unlock_strategy = :both
|
196
|
+
|
197
|
+
# Number of authentication tries before locking an account if lock_strategy
|
198
|
+
# is failed attempts.
|
199
|
+
# config.maximum_attempts = 20
|
200
|
+
|
201
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
202
|
+
# config.unlock_in = 1.hour
|
203
|
+
|
204
|
+
# Warn on the last attempt before the account is locked.
|
205
|
+
# config.last_attempt_warning = true
|
206
|
+
|
207
|
+
# ==> Configuration for :recoverable
|
208
|
+
#
|
209
|
+
# Defines which key will be used when recovering the password for an account
|
210
|
+
# config.reset_password_keys = [:email]
|
211
|
+
|
212
|
+
# Time interval you can reset your password with a reset password key.
|
213
|
+
# Don't put a too small interval or your users won't have the time to
|
214
|
+
# change their passwords.
|
215
|
+
config.reset_password_within = 6.hours
|
216
|
+
|
217
|
+
# When set to false, does not sign a user in automatically after their password is
|
218
|
+
# reset. Defaults to true, so a user is signed in automatically after a reset.
|
219
|
+
# config.sign_in_after_reset_password = true
|
220
|
+
|
221
|
+
# ==> Configuration for :encryptable
|
222
|
+
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
|
223
|
+
# You can use :sha1, :sha512 or algorithms from others authentication tools as
|
224
|
+
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
|
225
|
+
# for default behavior) and :restful_authentication_sha1 (then you should set
|
226
|
+
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
|
227
|
+
#
|
228
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
229
|
+
|
230
|
+
# Backward compatibility with Authlogic gem
|
231
|
+
config.encryptor = :authlogic_sha512
|
232
|
+
config.stretches = Rails.env.test? ? 1 : 20
|
233
|
+
|
234
|
+
# ==> Scopes configuration
|
235
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
236
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
237
|
+
# are using only default views.
|
238
|
+
# config.scoped_views = false
|
239
|
+
|
240
|
+
# Configure the default scope given to Warden. By default it's the first
|
241
|
+
# devise role declared in your routes (usually :user).
|
242
|
+
# config.default_scope = :user
|
243
|
+
|
244
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
245
|
+
# only the current scope. By default, Devise signs out all scopes.
|
246
|
+
# config.sign_out_all_scopes = true
|
247
|
+
|
248
|
+
# ==> Navigation configuration
|
249
|
+
# Lists the formats that should be treated as navigational. Formats like
|
250
|
+
# :html, should redirect to the sign in page when the user does not have
|
251
|
+
# access, but formats like :xml or :json, should return 401.
|
252
|
+
#
|
253
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
254
|
+
# should add them to the navigational formats lists.
|
255
|
+
#
|
256
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
257
|
+
# config.navigational_formats = ['*/*', :html]
|
258
|
+
|
259
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
260
|
+
config.sign_out_via = :delete
|
261
|
+
|
262
|
+
# ==> OmniAuth
|
263
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
264
|
+
# up on your models and hooks.
|
265
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
266
|
+
|
267
|
+
# ==> Warden configuration
|
268
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
269
|
+
# change the failure app, you can configure them inside the config.warden block.
|
270
|
+
#
|
271
|
+
# config.warden do |manager|
|
272
|
+
# manager.intercept_401 = false
|
273
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
274
|
+
# end
|
275
|
+
|
276
|
+
# ==> Mountable engine configurations
|
277
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
278
|
+
# is mountable, there are some extra configurations to be taken into account.
|
279
|
+
# The following options are available, assuming the engine is mounted as:
|
280
|
+
#
|
281
|
+
# mount MyEngine, at: '/my_engine'
|
282
|
+
#
|
283
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
284
|
+
# config.router_name = :my_engine
|
285
|
+
#
|
286
|
+
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
|
287
|
+
# so you need to do it manually. For the users scope, it would be:
|
288
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
289
|
+
end
|
@@ -1,10 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
4
|
-
#
|
5
|
-
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
|
-
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
|
-
#------------------------------------------------------------------------------
|
8
3
|
# Be sure to restart your server when you modify this file.
|
9
4
|
|
10
5
|
# Configure sensitive parameters which will be filtered from the log file.
|
@@ -10,5 +10,4 @@ GravatarImageTag.configure do |config|
|
|
10
10
|
config.filetype = nil # Set this if you require a specific image file format ['gif', 'jpg' or 'png']. Gravatar's default is png
|
11
11
|
config.rating = nil # Set this if you change the rating of the images that will be returned ['G', 'PG', 'R', 'X']. Gravatar's default is G
|
12
12
|
config.size = nil # Set this to globally set the size of the gravatar image returned (1..512). Gravatar's default is 80
|
13
|
-
config.secure = false # Set this to true if you require secure images on your pages.
|
14
13
|
end
|
@@ -1,10 +1,4 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
4
|
-
#
|
5
|
-
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
|
-
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
|
-
#------------------------------------------------------------------------------
|
8
2
|
# Be sure to restart your server when you modify this file.
|
9
3
|
|
10
4
|
# Add new inflection rules using the following format. Inflections
|