1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

change falsy value + updated changelog

This commit is contained in:
Sylvain 2020-01-07 10:34:12 +01:00
parent 60e063a15b
commit b6ee4e92a4
5 changed files with 7 additions and 5 deletions

View File

@ -5,6 +5,7 @@
- An event can be cancelled, if reservation cancellation is enabled
- Ability to import iCalendar agendas in the public calendar, through URLs to ICS files (RFC 5545)
- Ability to configure the duration of a reservation slot, using `SLOT_DURATION`. Previously, only 60 minutes slots were allowed
- Ability to force the email validation when a new user registers. This is optionally configured with `USER_CONFIRMATION_NEEDED_TO_SIGN_IN`
- Display the scheduled events in the admin calendar, depending on `EVENTS_IN_CALENDAR` configuration.
- Display indications on required fields in new administrator form
- Configuration of phone number in members registration forms: can be required or optional, depending on `PHONE_REQUIRED` configuration
@ -29,6 +30,7 @@
- [TODO DEPLOY] add the `SLOT_DURATION` environment variable (see [doc/environment.md](doc/environment.md#SLOT_DURATION) for configuration details)
- [TODO DEPLOY] add the `PHONE_REQUIRED` environment variable (see [doc/environment.md](doc/environment.md#PHONE_REQUIRED) for configuration details)
- [TODO DEPLOY] add the `EVENTS_IN_CALENDAR` environment variable (see [doc/environment.md](doc/environment.md#EVENTS_IN_CALENDAR) for configuration details)
- [TODO DEPLOY] add the `USER_CONFIRMATION_NEEDED_TO_SIGN_IN` environment variable (see [doc/environment.md](doc/environment.md#USER_CONFIRMATION_NEEDED_TO_SIGN_IN) for configuration details)
- [TODO DEPLOY] -> (only dev) `bundle install && yarn install`
- [TODO DEPLOY] `rake db:migrate`

View File

@ -289,7 +289,7 @@ class User < ActiveRecord::Base
end
def confirmation_required?
Rails.application.secrets.user_confirmation_needed_to_sign_in.present? ? super : false
Rails.application.secrets.user_confirmation_needed_to_sign_in ? super : false
end
private

View File

@ -60,7 +60,7 @@
<% if RecaptchaService.recaptcha_enabled? %>
Fablab.recaptchaSiteKey = "<%= RecaptchaService.site_key %>";
<% end %>
Fablab.userConfirmationNeededToSignIn = <%= Rails.application.secrets.user_confirmation_needed_to_sign_in.present? %>;
Fablab.userConfirmationNeededToSignIn = ('<%= Rails.application.secrets.user_confirmation_needed_to_sign_in %>' === 'true');
</script>
<%= stylesheet_link_tag 'application', media: 'all' %>

View File

@ -22,7 +22,7 @@ FABLAB_WITHOUT_ONLINE_PAYMENT: 'false'
FABLAB_WITHOUT_INVOICES: 'false'
PHONE_REQUIRED: 'true'
USER_CONFIRMATION_NEEDED_TO_SIGN_IN:
USER_CONFIRMATION_NEEDED_TO_SIGN_IN: 'false'
EVENTS_IN_CALENDAR: 'false'
SLOT_DURATION: '60'

View File

@ -108,12 +108,12 @@ This is useful if you have your own invoicing system and you want to prevent Fab
PHONE_REQUIRED
If set to 'false' the phone number won't be required to register a new user on the software.
<a name="USER_CONFIRMATION_NEEDED_TO_SIGN_IN"></a>
USER_CONFIRMATION_NEEDED_TO_SIGN_IN
If set to 'true' (or any non empty string) the users will need to confirm their email address to be able to sign in. Keep this variable empty if you don't want this behaviour.
If set to 'true' the users will need to confirm their email address to be able to sign in.
Set to 'false' if you don't want this behaviour.
<a name="EVENTS_IN_CALENDAR"></a>
EVENTS_IN_CALENDAR