mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
Merge remote-tracking branch 'origin/disable_wallet_option' into dev
This commit is contained in:
commit
11ccaa73b6
15
CHANGELOG.md
15
CHANGELOG.md
@ -121,6 +121,7 @@
|
||||
- [TODO DEPLOY] add the `MAX_IMPORT_SIZE` environment variable (see [doc/environment.md](doc/environment.md#MAX_IMPORT_SIZE) for configuration details)
|
||||
- [TODO DEPLOY] add the `FABLAB_WITHOUT_INVOICES` environment variable (see [doc/environment.md](doc/environment.md#FABLAB_WITHOUT_INVOICES) for configuration details)
|
||||
- [TODO DEPLOY] add the `SMTP_TLS` environment variable (see [doc/environment.md](doc/environment.md#SMTP_TLS) for configuration details)
|
||||
- [TODO DEPLOY] add the `FABLAB_WITHOUT_WALLET` environment variable (see [doc/environment.md](doc/environment.md#FABLAB_WITHOUT_WALLET) for configuration details)
|
||||
- [TODO DEPLOY] **IMPORTANT** Please read [postgres_upgrade.md](doc/postgres_upgrade.md) for instructions on upgrading PostgreSQL.
|
||||
|
||||
## v4.1.1 2019 September 20
|
||||
@ -154,7 +155,7 @@
|
||||
## v4.0.4 2019 August 14
|
||||
|
||||
- Fix a bug: #140 VAT rate is erroneous in invoices.
|
||||
Note: this bug was introduced in v4.0.3 and requires (if you are on v4.0.3) to regenerate the invoices since August 1st
|
||||
Note: this bug was introduced in v4.0.3 and requires (if you are on v4.0.3) to regenerate the invoices since August 1st
|
||||
- [TODO DEPLOY] `rake fablab:maintenance:regenerate_invoices[2019,8]`
|
||||
|
||||
## v4.0.3 2019 August 01
|
||||
@ -198,7 +199,7 @@
|
||||
- Refactored user's profile to keep invoicing data after an user was deleted
|
||||
- Refactored user's profile to keep statistical data after an user was deleted
|
||||
- Ability to delete an user (fixes #129 and #120)
|
||||
- Ask user acceptance before deposing analytics cookies
|
||||
- Ask user acceptance before deposing analytics cookies
|
||||
- Fix a bug: (spanish) some translations are not loaded correctly
|
||||
- Fix a bug: some users may not appear in the admin's general listing
|
||||
- Fix a bug: Availabilities export report an erroneous number of reservations for machine availabilities (#131)
|
||||
@ -395,8 +396,8 @@
|
||||
- Fix a security issue: sprockets < 2.12.5 has a security vulnerability as described in [CVE-2018-3760](https://nvd.nist.gov/vuln/detail/CVE-2018-3760)
|
||||
- Ensure elasticSearch indices are started with green status on new installations
|
||||
- Refactored User.to_json to remove code duplication
|
||||
- Fixed syntax and typos in README
|
||||
- [TODO DEPLOY] **IMPORTANT** Please read [elastic_upgrade.md](doc/elastic_upgrade.md) for instructions on upgrading ElasticSearch.
|
||||
- Fixed syntax and typos in README
|
||||
- [TODO DEPLOY] **IMPORTANT** Please read [elastic_upgrade.md](doc/elastic_upgrade.md) for instructions on upgrading ElasticSearch.
|
||||
- [TODO DEPLOY] `rake fablab:fix:categories_slugs`
|
||||
- [TODO DEPLOY] -> (only dev) `bundle install`
|
||||
- [TODO DEPLOY] `rake db:seed`
|
||||
@ -409,7 +410,7 @@
|
||||
- Set Stripe API version, all Fab-managers has to use this version because codebase relies on it
|
||||
- Fix a security issue: OmniAuth < 1.3.2 has a security vulnerability described in [CVE-2017-18076](https://nvd.nist.gov/vuln/detail/CVE-2017-18076)
|
||||
- Fix a security issue: rack-protection < 1.5.5 has a security vulnerability described in [CVE-2018-1000119](https://nvd.nist.gov/vuln/detail/CVE-2018-1000119)
|
||||
- Fix a security issue: http gem < 0.7.3 has a security vulnerability described in [CVE-2015-1828](https://nvd.nist.gov/vuln/detail/CVE-2015-1828), updates twitter gem as a dependency
|
||||
- Fix a security issue: http gem < 0.7.3 has a security vulnerability described in [CVE-2015-1828](https://nvd.nist.gov/vuln/detail/CVE-2015-1828), updates twitter gem as a dependency
|
||||
|
||||
## v2.6.3 2018 January 2
|
||||
|
||||
@ -465,12 +466,12 @@
|
||||
|
||||
## v2.5.13 2017 September 11
|
||||
|
||||
- Fix a bug: ActiveRecord::RecordNotFound when running rake task fix:recursive_events_over_DST with recursive events which the initial event was deleted
|
||||
- Fix a bug: ActiveRecord::RecordNotFound when running rake task fix:recursive_events_over_DST with recursive events which the initial event was deleted
|
||||
|
||||
## v2.5.12 2017 September 11
|
||||
|
||||
- Fix a bug: Long words overflow from homepage's events blocks
|
||||
- Fix a bug: ActiveRecord::RecordNotFound when running rake task fix:recursive_events_over_DST with non-recursive events
|
||||
- Fix a bug: ActiveRecord::RecordNotFound when running rake task fix:recursive_events_over_DST with non-recursive events
|
||||
|
||||
## v2.5.11 2017 September 7
|
||||
|
||||
|
@ -97,6 +97,8 @@ angular.module('application', ['ngCookies', 'ngResource', 'ngSanitize', 'ui.rout
|
||||
$rootScope.slotDuration = Fablab.slotDuration;
|
||||
// Global config: if true, user must confirm his email to sign in
|
||||
$rootScope.userConfirmationNeededToSignIn = Fablab.userConfirmationNeededToSignIn;
|
||||
// Global config: if true, wallet will be disable
|
||||
$rootScope.fablabWithoutWallet = Fablab.fablabWithoutWallet;
|
||||
|
||||
// Global function to allow the user to navigate to the previous screen (ie. $state).
|
||||
// If no previous $state were recorded, navigate to the home page
|
||||
|
@ -224,7 +224,7 @@
|
||||
</div>
|
||||
</uib-tab>
|
||||
|
||||
<uib-tab heading="{{ 'app.admin.members_edit.wallet' | translate }}">
|
||||
<uib-tab heading="{{ 'app.admin.members_edit.wallet' | translate }}" ng-hide="fablabWithoutWallet">
|
||||
<div class="col-md-12 m m-t-lg">
|
||||
<ng-include src="'<%= asset_path "wallet/show.html" %>'"></ng-include>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
<li ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.trainings" translate>{{ 'app.public.common.my_trainings' }}</a></li>
|
||||
<li ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.events" translate>{{ 'app.public.common.my_events' }}</a></li>
|
||||
<li ui-sref-active="active" ng-hide="fablabWithoutInvoices"><a class="text-black" href="#" ui-sref="app.logged.dashboard.invoices" translate>{{ 'app.public.common.my_invoices' }}</a></li>
|
||||
<li ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.wallet" translate>{{ 'app.public.common.my_wallet' }}</a></li>
|
||||
<li ng-hide="fablabWithoutWallet" ui-sref-active="active"><a class="text-black" href="#" ui-sref="app.logged.dashboard.wallet" translate>{{ 'app.public.common.my_wallet' }}</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -39,6 +39,7 @@
|
||||
<li><a ui-sref="app.logged.dashboard.trainings" translate>{{ 'app.public.common.my_trainings' }}</a></li>
|
||||
<li><a ui-sref="app.logged.dashboard.events" translate>{{ 'app.public.common.my_events' }}</a></li>
|
||||
<li><a ui-sref="app.logged.dashboard.invoices" ng-hide="fablabWithoutInvoices" translate>{{ 'app.public.common.my_invoices' }}</a></li>
|
||||
<li ng-hide="fablabWithoutWallet"><a ui-sref="app.logged.dashboard.wallet" translate>{{ 'app.public.common.my_wallet' }}</a></li>
|
||||
<li><a ui-sref="app.logged.dashboard.wallet" translate>{{ 'app.public.common.my_wallet' }}</a></li>
|
||||
<li class="divider" ng-if="currentUser.role === 'admin'"></li>
|
||||
<li><a class="text-black pointer" ng-click="help($event)" ng-if="currentUser.role === 'admin'"><i class="fa fa-question-circle"></i> <span translate>{{ 'app.public.common.help' }}</span> </a></li>
|
||||
|
@ -18,6 +18,8 @@ class API::WalletController < API::ApiController
|
||||
end
|
||||
|
||||
def credit
|
||||
return head 422 if Rails.application.secrets.fablab_without_wallet == 'true'
|
||||
|
||||
@wallet = Wallet.find(credit_params[:id])
|
||||
authorize @wallet
|
||||
service = WalletService.new(user: current_user, wallet: @wallet)
|
||||
|
@ -28,6 +28,7 @@
|
||||
Fablab.withoutOnlinePayment = ('<%= Rails.application.secrets.fablab_without_online_payments %>' === 'true');
|
||||
Fablab.withoutInvoices = ('<%= Rails.application.secrets.fablab_without_invoices %>' === 'true');
|
||||
Fablab.phoneRequired = ('<%= Rails.application.secrets.phone_required %>' === 'true');
|
||||
Fablab.fablabWithoutWallet = ('<%= Rails.application.secrets.fablab_without_wallet %>' === 'true');
|
||||
Fablab.eventsInCalendar = ('<%= Rails.application.secrets.events_in_calendar %>' === 'true');
|
||||
Fablab.slotDuration = parseInt("<%= ApplicationHelper::SLOT_DURATION %>", 10);
|
||||
Fablab.featureTourDisplay = "<%= Rails.application.secrets.feature_tour_display %>";
|
||||
|
@ -21,6 +21,7 @@ FABLAB_WITHOUT_SPACES: 'true'
|
||||
FABLAB_WITHOUT_ONLINE_PAYMENT: 'false'
|
||||
FABLAB_WITHOUT_INVOICES: 'false'
|
||||
PHONE_REQUIRED: 'true'
|
||||
FABLAB_WITHOUT_WALLET: 'false'
|
||||
|
||||
USER_CONFIRMATION_NEEDED_TO_SIGN_IN: 'false'
|
||||
|
||||
|
@ -21,6 +21,7 @@ development:
|
||||
fablab_without_online_payments: <%= ENV["FABLAB_WITHOUT_ONLINE_PAYMENT"] %>
|
||||
fablab_without_invoices: <%= ENV["FABLAB_WITHOUT_INVOICES"] %>
|
||||
phone_required: <%= ENV["PHONE_REQUIRED"] %>
|
||||
fablab_without_wallet: <%= ENV["FABLAB_WITHOUT_WALLET"] %>
|
||||
user_confirmation_needed_to_sign_in: <%= ENV["USER_CONFIRMATION_NEEDED_TO_SIGN_IN"] %>
|
||||
events_in_calendar: <%= ENV["EVENTS_IN_CALENDAR"] %>
|
||||
slot_duration: <%= ENV["SLOT_DURATION"] %>
|
||||
@ -68,6 +69,7 @@ test:
|
||||
fablab_without_online_payments: false
|
||||
fablab_without_invoices: false
|
||||
phone_required: true
|
||||
fablab_without_wallet: false
|
||||
user_confirmation_needed_to_sign_in: <%= ENV["USER_CONFIRMATION_NEEDED_TO_SIGN_IN"] %>
|
||||
events_in_calendar: false
|
||||
slot_duration: 60
|
||||
@ -115,6 +117,7 @@ staging:
|
||||
fablab_without_online_payments: <%= ENV["FABLAB_WITHOUT_ONLINE_PAYMENT"] %>
|
||||
fablab_without_invoices: <%= ENV["FABLAB_WITHOUT_INVOICES"] %>
|
||||
phone_required: <%= ENV["PHONE_REQUIRED"] %>
|
||||
fablab_without_wallet: <%= ENV["FABLAB_WITHOUT_WALLET"] %>
|
||||
user_confirmation_needed_to_sign_in: <%= ENV["USER_CONFIRMATION_NEEDED_TO_SIGN_IN"] %>
|
||||
events_in_calendar: <%= ENV["EVENTS_IN_CALENDAR"] %>
|
||||
slot_duration: <%= ENV["SLOT_DURATION"] %>
|
||||
@ -174,6 +177,7 @@ production:
|
||||
fablab_without_online_payments: <%= ENV["FABLAB_WITHOUT_ONLINE_PAYMENT"] %>
|
||||
fablab_without_invoices: <%= ENV["FABLAB_WITHOUT_INVOICES"] %>
|
||||
phone_required: <%= ENV["PHONE_REQUIRED"] %>
|
||||
fablab_without_wallet: <%= ENV["FABLAB_WITHOUT_WALLET"] %>
|
||||
user_confirmation_needed_to_sign_in: <%= ENV["USER_CONFIRMATION_NEEDED_TO_SIGN_IN"] %>
|
||||
events_in_calendar: <%= ENV["EVENTS_IN_CALENDAR"] %>
|
||||
slot_duration: <%= ENV["SLOT_DURATION"] %>
|
||||
|
@ -102,6 +102,13 @@ Valid stripe API keys are still required, even if you don't require online payme
|
||||
If set to 'true', the invoices will be disabled.
|
||||
This is useful if you have your own invoicing system and you want to prevent Fab-manager from generating and sending invoices to members.
|
||||
**Very important**: if you disable invoices, you still have to configure VAT in the interface to prevent errors in accounting and prices.
|
||||
<a name="FABLAB_WITHOUT_WALLET"></a>
|
||||
|
||||
FABLAB_WITHOUT_WALLET
|
||||
|
||||
If set to 'true', the wallet will be disabled.
|
||||
This is useful if you won't use wallet system
|
||||
**Very important**: if you disable invoices, you still have to configure VAT in the interface to prevent errors in accounting and prices.
|
||||
<a name="PHONE_REQUIRED"></a>
|
||||
|
||||
PHONE_REQUIRED
|
||||
|
@ -14,6 +14,7 @@ FABLAB_WITHOUT_SPACES=true
|
||||
FABLAB_WITHOUT_ONLINE_PAYMENT=true
|
||||
FABLAB_WITHOUT_INVOICES=false
|
||||
PHONE_REQUIRED=false
|
||||
FABLAB_WITHOUT_WALLET=false
|
||||
|
||||
EVENTS_IN_CALENDAR=false
|
||||
SLOT_DURATION=60
|
||||
|
Loading…
Reference in New Issue
Block a user