mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Merge remote-tracking branch 'github/master' into dev
This commit is contained in:
commit
7d54341d98
@ -39,14 +39,14 @@ Some other used libraries/components are licenced under the terms of the
|
||||
|
||||
Errors and omissions excepted, the other external libraries used in this
|
||||
project are licenced under the terms of the [MIT Licence](https://opensource.org/licenses/MIT).
|
||||
Please refer to the libraries documentation for more informations about
|
||||
their licences.
|
||||
Please refer to the libraries documentation for more information about
|
||||
their licences.
|
||||
|
||||
Complete lists of used libraries are available in `bower.json` for the
|
||||
EcmaScript libraries and in `Gemfile` for Ruby libraries.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
@ -666,4 +666,4 @@ an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
32
README.md
32
README.md
@ -159,7 +159,7 @@ This value is only used when deploying with Docker, otherwise this is configured
|
||||
POSTGRES_PASSWORD
|
||||
|
||||
Password for the PostgreSQL user, as specified in `database.yml`.
|
||||
Please see [Setup the FabManager database in PostgreSQL](#setup-fabmanager-in-postgresql) for informations on how to create a user and set his password.
|
||||
Please see [Setup the FabManager database in PostgreSQL](#setup-fabmanager-in-postgresql) for information on how to create a user and set his password.
|
||||
This value is only used when deploying with Docker, otherwise this is configured in `config/database.yml`.
|
||||
|
||||
REDIS_HOST
|
||||
@ -222,11 +222,11 @@ Identifier of your Google Analytics account.
|
||||
|
||||
Unique identifier of your [Disqus](http://www.disqus.com) forum.
|
||||
Disqus forums are used to allow visitors to comment on projects.
|
||||
See https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname- for more informations.
|
||||
See https://help.disqus.com/customer/portal/articles/466208-what-s-a-shortname- for more information.
|
||||
|
||||
TWITTER_NAME
|
||||
|
||||
Identifier of the Twitter account, from witch the last tweet will be fetched and displayed on the home page.
|
||||
Identifier of the Twitter account, from witch the last tweet will be fetched and displayed on the home page.
|
||||
It will also be used for [Twitter Card analytics](https://dev.twitter.com/cards/analytics).
|
||||
|
||||
TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET, TWITTER_ACCESS_TOKEN & TWITTER_ACCESS_TOKEN_SECRET
|
||||
@ -241,8 +241,8 @@ If you do so, you'll be able to customize and get statistics about project share
|
||||
|
||||
LOG_LEVEL
|
||||
|
||||
This parameter configures the logs verbosity.
|
||||
Available log levels can be found [here](http://guides.rubyonrails.org/debugging_rails_applications.html#log-levels).
|
||||
This parameter configures the logs verbosity.
|
||||
Available log levels can be found [here](http://guides.rubyonrails.org/debugging_rails_applications.html#log-levels).
|
||||
|
||||
ALLOWED_EXTENSIONS
|
||||
|
||||
@ -361,7 +361,7 @@ To create it, please follow these instructions:
|
||||
ALTER USER sleede WITH ENCRYPTED PASSWORD 'sleede';
|
||||
```
|
||||
6. Finally, have a look at the [PostgreSQL Limitations](#postgresql-limitations) section or some errors will occurs preventing you from finishing the installation procedure.
|
||||
|
||||
|
||||
<a name="postgresql-limitations"></a>
|
||||
### PostgreSQL Limitations
|
||||
|
||||
@ -370,14 +370,14 @@ To create it, please follow these instructions:
|
||||
So here's your choices, mainly depending on your security requirements:
|
||||
- Use the default PostgreSQL super-user (postgres) as the database user of fab-manager.
|
||||
- Set your user as _SUPERUSER_; run the following command in `psql` (after replacing `sleede` with you user name):
|
||||
|
||||
|
||||
```sql
|
||||
ALTER USER sleede WITH SUPERUSER;
|
||||
```
|
||||
|
||||
- Install and configure the PostgreSQL extension [pgextwlist](https://github.com/dimitri/pgextwlist).
|
||||
|
||||
- Install and configure the PostgreSQL extension [pgextwlist](https://github.com/dimitri/pgextwlist).
|
||||
Please follow the instructions detailed on the extension website to whitelist `unaccent` and `trigram` for the user configured in `config/database.yml`.
|
||||
- Some users may want to use another DBMS than PostgreSQL.
|
||||
- Some users may want to use another DBMS than PostgreSQL.
|
||||
This is currently not supported, because of some PostgreSQL specific instructions that cannot be efficiently handled with the ActiveRecord ORM:
|
||||
- `app/controllers/api/members_controllers.rb@list` is using `ILIKE`
|
||||
- `app/controllers/api/invoices_controllers.rb@list` is using `ILIKE` and `date_trunc()`
|
||||
@ -386,8 +386,8 @@ To create it, please follow these instructions:
|
||||
- `db/migrate/20150604131525_add_meta_data_to_notifications.rb` is using [jsonb](https://www.postgresql.org/docs/9.4/static/datatype-json.html), a PostgreSQL 9.4+ datatype.
|
||||
- `db/migrate/20160915105234_add_transformation_to_o_auth2_mapping.rb` is using [jsonb](https://www.postgresql.org/docs/9.4/static/datatype-json.html), a PostgreSQL 9.4+ datatype.
|
||||
- If you intend to contribute to the project code, you will need to run the test suite with `rake test`.
|
||||
This also requires your user to have the _SUPERUSER_ role.
|
||||
Please see the [known issues](#known-issues) section for more informations about this.
|
||||
This also requires your user to have the _SUPERUSER_ role.
|
||||
Please see the [known issues](#known-issues) section for more information about this.
|
||||
|
||||
<a name="elasticsearch"></a>
|
||||
## ElasticSearch
|
||||
@ -518,7 +518,7 @@ Back-end translations uses the [Ruby on Rails syntax](http://guides.rubyonrails.
|
||||
|
||||
In each cases, some inline comments are included in the localisation files.
|
||||
They can be recognized as they start with the sharp character (#).
|
||||
These comments are not required to be translated, they are intended to help the translator to have some context informations about the sentence to translate.
|
||||
These comments are not required to be translated, they are intended to help the translator to have some context information about the sentence to translate.
|
||||
|
||||
|
||||
<a name="i18n-configuration"></a>
|
||||
@ -652,7 +652,7 @@ Fab-manager can be connected to a [Single Sign-On](https://en.wikipedia.org/wiki
|
||||
Currently OAuth 2 is the only supported protocol for SSO authentication.
|
||||
|
||||
For an example of how to use configure a SSO in Fab-manager, please read [sso_with_github.md](doc/sso_with_github.md).
|
||||
Developers may find informations on how to implement their own authentication protocol in [sso_authentication.md](doc/sso_authentication.md).
|
||||
Developers may find information on how to implement their own authentication protocol in [sso_authentication.md](doc/sso_authentication.md).
|
||||
|
||||
<a name="known-issues"></a>
|
||||
## Known issues
|
||||
@ -692,10 +692,10 @@ Developers may find informations on how to implement their own authentication pr
|
||||
|
||||
DO NOT do this in a production environment, unless you know what you're doing: this could lead to a serious security issue.
|
||||
|
||||
- With Ubuntu 16.04, ElasticSearch may refuse to start even after having configured the service with systemd.
|
||||
- With Ubuntu 16.04, ElasticSearch may refuse to start even after having configured the service with systemd.
|
||||
To solve this issue, you may have to set `START_DAEMON` to `true` in `/etc/default/elasticsearch`.
|
||||
Then reload ElasticSearch with:
|
||||
|
||||
|
||||
```bash
|
||||
sudo systemctl restart elasticsearch.service
|
||||
```
|
||||
|
@ -71,7 +71,7 @@ config(['$httpProvider', 'AuthProvider', "growlProvider", "unsavedWarningsConfig
|
||||
// Angular-xeditable (click-to-edit elements, used in admin backoffice)
|
||||
editableOptions.theme = 'bs3';
|
||||
|
||||
// Alter the UI-Router's $state, registering into some informations concerning the previous $state.
|
||||
// Alter the UI-Router's $state, registering into some information concerning the previous $state.
|
||||
// This is used to allow the user to navigate to the previous state
|
||||
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams){
|
||||
$state.prevState = fromState;
|
||||
|
@ -217,7 +217,7 @@ Application.Controllers.controller "GraphsController", ["$scope", "$state", "$ro
|
||||
for it_st in [0.. cur_type.subtypes.length-1] by 1 # when we've found it, iterate over its subtypes ...
|
||||
cur_subtype = cur_type.subtypes[it_st]
|
||||
if subgroup.key == cur_subtype.key # ... which match $SUBTYPE
|
||||
# then we construct NVD3 dataSource according to these informations
|
||||
# then we construct NVD3 dataSource according to these information
|
||||
dataSource =
|
||||
values: []
|
||||
key: cur_subtype.label
|
||||
|
@ -125,7 +125,7 @@ Application.Controllers.controller "InvoicesController", ["$scope", "$state", 'I
|
||||
sample = sample.replace(/y+(?![^\[]*])/g, (match, offset, string) ->
|
||||
padWithZeros(8, match.length)
|
||||
)
|
||||
# date informations
|
||||
# date information
|
||||
sample = sample.replace(/[YMD]+(?![^\[]*])/g, (match, offset, string) ->
|
||||
$scope.today.format(match)
|
||||
)
|
||||
@ -163,7 +163,7 @@ Application.Controllers.controller "InvoicesController", ["$scope", "$state", 'I
|
||||
sample = sample.replace(/d+(?![^\[]*])/g, (match, offset, string) ->
|
||||
padWithZeros(2, match.length)
|
||||
)
|
||||
# date informations
|
||||
# date information
|
||||
sample = sample.replace(/[YMD]+(?![^\[]*])/g, (match, offset, string) ->
|
||||
$scope.today.format(match)
|
||||
)
|
||||
@ -334,7 +334,7 @@ Application.Controllers.controller "InvoicesController", ["$scope", "$state", 'I
|
||||
|
||||
|
||||
##
|
||||
# Callback to save the value of the legal informations zone when editing is done
|
||||
# Callback to save the value of the legal information zone when editing is done
|
||||
##
|
||||
$scope.legalsEditEnd = (event) ->
|
||||
parsed = parseHtml($scope.invoice.legals.content)
|
||||
|
@ -303,7 +303,7 @@ Application.Controllers.controller "ReserveMachineController", ["$scope", "$stat
|
||||
## fullCalendar event. An already booked slot that the user want to modify
|
||||
$scope.slotToModify = null
|
||||
|
||||
## indicates the state of the current view : calendar or plans informations
|
||||
## indicates the state of the current view : calendar or plans information
|
||||
$scope.plansAreShown = false
|
||||
|
||||
## will store the user's plan if he choosed to buy one
|
||||
|
@ -14,10 +14,10 @@ Application.Controllers.controller "MembersController", ["$scope", 'Member', 'me
|
||||
|
||||
|
||||
### PUBLIC SCOPE ###
|
||||
|
||||
|
||||
## currently displayed page of members
|
||||
$scope.page = 1
|
||||
|
||||
|
||||
## members list
|
||||
$scope.members = membersPromise
|
||||
|
||||
@ -31,12 +31,12 @@ Application.Controllers.controller "MembersController", ["$scope", 'Member', 'me
|
||||
$scope.showNextMembers = ->
|
||||
$scope.page += 1
|
||||
Member.query {
|
||||
requested_attributes:'[profile]',
|
||||
page: $scope.page,
|
||||
requested_attributes:'[profile]',
|
||||
page: $scope.page,
|
||||
size: MEMBERS_PER_PAGE
|
||||
}, (members) ->
|
||||
$scope.members = $scope.members.concat(members)
|
||||
|
||||
|
||||
if (!members[0] || members[0].maxMembers <= $scope.members.length)
|
||||
$scope.noMoreResults = true
|
||||
|
||||
@ -260,7 +260,7 @@ Application.Controllers.controller "EditProfileController", ["$scope", "$rootSco
|
||||
##
|
||||
Application.Controllers.controller "ShowProfileController", ["$scope", 'memberPromise', 'SocialNetworks', ($scope, memberPromise, SocialNetworks) ->
|
||||
|
||||
## Selected user's informations
|
||||
## Selected user's information
|
||||
$scope.user = memberPromise # DEPENDENCY WITH NAVINUM GAMIFICATION PLUGIN !!!!
|
||||
|
||||
## List of social networks associated with this user and toggle 'show all' state
|
||||
|
@ -20,13 +20,13 @@ Application.Controllers.controller "CompleteProfileController", ["$scope", "$roo
|
||||
## name of the current fablab application (eg. "Fablab de la Casemate")
|
||||
$scope.fablabName = settingsPromise.fablab_name
|
||||
|
||||
## informations from the current SSO provider
|
||||
## information from the current SSO provider
|
||||
$scope.activeProvider = activeProviderPromise
|
||||
|
||||
## list of user's groups (student/standard/...)
|
||||
$scope.groups = groupsPromise
|
||||
|
||||
## current user, contains informations retrieved from the SSO
|
||||
## current user, contains information retrieved from the SSO
|
||||
$scope.user = memberPromise
|
||||
|
||||
## disallow the user to change his password as he connect from SSO
|
||||
@ -177,4 +177,4 @@ Application.Controllers.controller "CompleteProfileController", ["$scope", "$roo
|
||||
## !!! MUST BE CALLED AT THE END of the controller
|
||||
initialize()
|
||||
|
||||
]
|
||||
]
|
||||
|
@ -109,7 +109,7 @@ Application.Controllers.controller "ReserveTrainingController", ["$scope", "$sta
|
||||
groupObj.plans.push(plan) if plan.group_id == group.id
|
||||
$scope.plansClassifiedByGroup.push(groupObj)
|
||||
|
||||
## indicates the state of the current view : calendar or plans informations
|
||||
## indicates the state of the current view : calendar or plans information
|
||||
$scope.plansAreShown = false
|
||||
|
||||
## indicates if the selected training was validated (ie. added to the shopping cart)
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h2 translate>{{ 'general_informations' }}</h2>
|
||||
<h2 translate>{{ 'general_information' }}</h2>
|
||||
<input type="hidden" name="_method" value="{{method}}">
|
||||
|
||||
<div class="form-group" ng-class="{'has-error': planForm['plan[base_name]'].$dirty && planForm['plan[base_name]'].$invalid}">
|
||||
@ -155,4 +155,4 @@
|
||||
<span ng-repeat="partner in plan.partners">
|
||||
<input type="text" class="form-control" disabled value="{{ partner.first_name}} {{partner.last_name }}">
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -68,7 +68,7 @@
|
||||
|
||||
<section class="widget panel b-a m m-t-lg">
|
||||
<div class="panel-heading b-b small">
|
||||
<h3 translate>{{ 'informations_and_booking' }}</h3>
|
||||
<h3 translate>{{ 'information_and_booking' }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-content wrapper">
|
||||
|
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
|
||||
<br ng-show="!plan.plan_file_url"> <!-- TODO Refacto with CSS -->
|
||||
<a ng-href="{{ plan.plan_file_url }}" ng-show="plan.plan_file_url" target="_blank" translate>{{ 'more_informations' }}</a>
|
||||
<a ng-href="{{ plan.plan_file_url }}" ng-show="plan.plan_file_url" target="_blank" translate>{{ 'more_information' }}</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -313,7 +313,7 @@
|
||||
|
||||
<!-- allow receive newsletter -->
|
||||
<div class="form-group">
|
||||
<label for="allowNewsletter" translate>{{ 'i_accept_to_receive_informations_from_the_fablab' }}</label>
|
||||
<label for="allowNewsletter" translate>{{ 'i_accept_to_receive_information_from_the_fablab' }}</label>
|
||||
<input bs-switch
|
||||
ng-model="user.is_allow_newsletter"
|
||||
id="allowNewsletter"
|
||||
|
@ -213,7 +213,7 @@ class User < ActiveRecord::Base
|
||||
|
||||
where(provider: auth.provider, uid: auth.uid).first_or_create.tap do |user|
|
||||
# execute this regardless of whether record exists or not (-> User#tap)
|
||||
# this will init or update the user thanks to the informations retrieved from the SSO
|
||||
# this will init or update the user thanks to the information retrieved from the SSO
|
||||
user.profile ||= Profile.new
|
||||
auth.info.mapping.each do |key, value|
|
||||
user.set_data_from_sso_mapping(key, value)
|
||||
|
@ -27,7 +27,7 @@ module PDF
|
||||
image StringIO.new( Base64.decode64(img_b64.value) ), :fit => [415,40]
|
||||
move_down 20
|
||||
font('Open-Sans', :size => 10) do
|
||||
# general informations
|
||||
# general information
|
||||
if invoice.is_a?(Avoir)
|
||||
text I18n.t('invoices.refund_invoice_reference', REF:invoice.reference), :leading => 3
|
||||
else
|
||||
@ -47,7 +47,7 @@ module PDF
|
||||
text I18n.t('invoices.invoice_issued_on_DATE', DATE:I18n.l(invoice.created_at.to_date))
|
||||
end
|
||||
|
||||
# user/organization's informations
|
||||
# user/organization's information
|
||||
if invoice&.user&.profile&.organization
|
||||
name = invoice.user.profile.organization.name
|
||||
else
|
||||
@ -261,7 +261,7 @@ module PDF
|
||||
end
|
||||
text payment_verbose
|
||||
|
||||
# important informations
|
||||
# important information
|
||||
move_down 40
|
||||
txt = parse_html(Setting.find_by({name: 'invoice_text'}).value)
|
||||
txt.each_line do |line|
|
||||
@ -269,7 +269,7 @@ module PDF
|
||||
end
|
||||
|
||||
|
||||
# address and legals informations
|
||||
# address and legals information
|
||||
move_down 40
|
||||
txt = parse_html(Setting.find_by({name: 'invoice_legals'}).value)
|
||||
txt.each_line do |line|
|
||||
|
@ -1,5 +1,5 @@
|
||||
json.title notification.notification_type
|
||||
json.description t('.account_imported_from_PROVIDER_(UID)_has_completed_its_informations_html',
|
||||
json.description t('.account_imported_from_PROVIDER_(UID)_has_completed_its_information_html',
|
||||
PROVIDER: notification.attached_object.provider,
|
||||
UID: notification.attached_object.uid)
|
||||
json.url notification_url(notification, format: :json)
|
||||
json.url notification_url(notification, format: :json)
|
||||
|
@ -4,7 +4,7 @@
|
||||
<p><%= t('.body.new_account_imported', ID: @attached_object.id, PROVIDER: provider.name) %><br/>
|
||||
<%= t('.body.provider_uid', UID:@attached_object.uid) %></p>
|
||||
<% if provider.sso_fields.size > 1 %>
|
||||
<p><%= t('.body.known_informations') %></p>
|
||||
<p><%= t('.body.known_information') %></p>
|
||||
<ul>
|
||||
<% for field in provider.sso_fields %>
|
||||
<% value = @attached_object.get_data_from_sso_mapping(field) %>
|
||||
|
@ -80,7 +80,7 @@ en:
|
||||
phone_number: "Phone number"
|
||||
phone_number_is_required: "Phone number is required."
|
||||
i_authorize_Fablab_users_registered_on_the_site_to_contact_me: "I authorize FabLab users, registered on the site, to contact me"
|
||||
i_accept_to_receive_informations_from_the_fablab: "I accept to receive informations from the FabLab"
|
||||
i_accept_to_receive_information_from_the_fablab: "I accept to receive information from the FabLab"
|
||||
i_ve_read_and_i_accept_: "I've read and I accept"
|
||||
_the_fablab_policy: "the FabLab policy"
|
||||
|
||||
@ -200,7 +200,7 @@ en:
|
||||
i_choose_that_plan: "I choose that plan"
|
||||
i_subscribe_online: "I subscribe online"
|
||||
i_already_subscribed: "I already subscribed"
|
||||
more_informations: "More informations"
|
||||
more_information: "More information"
|
||||
your_subscription_expires_on_the_DATE: "Your subscription expires on the {{DATE}}" # angular interpolation
|
||||
my_group: "My group"
|
||||
his_group: "{GENDER, select, male{His} female{Her} other{Its}} group" # messageFormat interpolation
|
||||
|
@ -80,7 +80,7 @@ fr:
|
||||
phone_number: "Numéro de téléphone"
|
||||
phone_number_is_required: "Le numéro de téléphone est requis."
|
||||
i_authorize_Fablab_users_registered_on_the_site_to_contact_me: "J'autorise les utilisateurs du Fab Lab inscrits sur le site à me contacter"
|
||||
i_accept_to_receive_informations_from_the_fablab: "J'accepte de recevoir des informations du Fab Lab"
|
||||
i_accept_to_receive_information_from_the_fablab: "J'accepte de recevoir des informations du Fab Lab"
|
||||
i_ve_read_and_i_accept_: "J'ai lu et j'accepte"
|
||||
_the_fablab_policy: "la charte d'utilisation du Fab Lab"
|
||||
|
||||
@ -201,7 +201,7 @@ fr:
|
||||
i_choose_that_plan: "Je choisis cette formule"
|
||||
i_subscribe_online: "Je m'abonne en ligne"
|
||||
i_already_subscribed: "Je suis déjà abonné"
|
||||
more_informations: "Plus d'infos"
|
||||
more_information: "Plus d'infos"
|
||||
your_subscription_expires_on_the_DATE: "Votre abonnement expire au {{DATE}}" # angular interpolation
|
||||
my_group: "Mon groupe"
|
||||
his_group: "Son groupe" # messageFormat interpolation
|
||||
@ -228,7 +228,7 @@ fr:
|
||||
# détails d'un événement et réservation
|
||||
event_description: "Description de l'évènement"
|
||||
downloadable_documents: "Documents à télécharger"
|
||||
informations_and_booking: "Informations et réservation"
|
||||
information_and_booking: "Informations et réservation"
|
||||
beginning: "Début :"
|
||||
ending: "Fin :"
|
||||
opening_hours: "Horaires :"
|
||||
|
@ -199,7 +199,7 @@ en:
|
||||
|
||||
plan:
|
||||
# subscription plan edition form
|
||||
general_informations: "General informations"
|
||||
general_information: "General information"
|
||||
name_length_must_be_less_than_24_characters: "Name length must be less than 24 characters."
|
||||
type_is_required: "Type is required."
|
||||
group: "Group"
|
||||
@ -368,4 +368,4 @@ en:
|
||||
unable_to_apply_the_coupon_because_expired: "Unable to apply the coupon: this code has expired."
|
||||
unable_to_apply_the_coupon_because_sold_out: "Unable to apply the coupon: this code reached its quota."
|
||||
unable_to_apply_the_coupon_because_already_used: "Unable to apply the coupon: you have already used this code once before."
|
||||
unable_to_apply_the_coupon_because_rejected: "This code does not exists."
|
||||
unable_to_apply_the_coupon_because_rejected: "This code does not exists."
|
||||
|
@ -186,7 +186,7 @@ en:
|
||||
notify_admin_member_create_reservation:
|
||||
a_RESERVABLE_reservation_was_made_by_USER_html: "A <strong><em>%{RESERVABLE}</em></strong> reservation was made by <strong><em>%{USER}</em></strong>."
|
||||
notify_admin_profile_complete:
|
||||
account_imported_from_PROVIDER_(UID)_has_completed_its_informations_html: "Account imported from <strong><em>%{PROVIDER} </strong> (%{UID})</em> has completed its informations."
|
||||
account_imported_from_PROVIDER_(UID)_has_completed_its_information_html: "Account imported from <strong><em>%{PROVIDER} </strong> (%{UID})</em> has completed its information."
|
||||
notify_admin_slot_is_canceled:
|
||||
USER_s_reservation_on_the_DATE_was_cancelled_remember_to_generate_a_refund_invoice_if_applicable_html: "<strong><em>%{USER}</em></strong>'s reservation, on the %{DATE}, was cancelled. Remember to generate a refund invoice if applicable."
|
||||
notify_admin_slot_is_modified:
|
||||
@ -320,4 +320,4 @@ en:
|
||||
price_category:
|
||||
# initial price's category for events, created to replace the old "reduced amount" property
|
||||
reduced_fare: "Reduced fare"
|
||||
reduced_fare_if_you_are_under_25_student_or_unemployed: "Reduced fare if you are under 25, student or unemployed."
|
||||
reduced_fare_if_you_are_under_25_student_or_unemployed: "Reduced fare if you are under 25, student or unemployed."
|
||||
|
@ -198,7 +198,7 @@ en:
|
||||
body:
|
||||
new_account_imported: "A new user account (ID: %{ID}) has been imported to the website via %{PROVIDER}."
|
||||
provider_uid: "its provider ID is: "
|
||||
known_informations: "Here is what we know about this provider:"
|
||||
known_information: "Here is what we know about this provider:"
|
||||
address_already_used: "This address is already associated with another user"
|
||||
no_more_info_available: "No other info about this user can be provided before he completes his profile."
|
||||
|
||||
|
@ -198,7 +198,7 @@ fr:
|
||||
body:
|
||||
new_account_imported: "Un nouveau compte utilisateur (ID: %{ID}) vient d'être importé sur la plate-forme via %{PROVIDER}."
|
||||
provider_uid: "Son identifiant fournisseur est %{UID}."
|
||||
known_informations: "Voici les informations connues à son propos :"
|
||||
known_information: "Voici les informations connues à son propos :"
|
||||
address_already_used: "Cette adresse est déjà associée à un autre utilisateur"
|
||||
no_more_info_available: "Aucune autre information sur cet utilisateur n'est disponible tant que celui-ci n'aura pas complété son profil."
|
||||
|
||||
|
@ -9,13 +9,13 @@ For this guide, we will use [GitHub](https://developer.github.com/v3/oauth/) as
|
||||
Visit https://github.com/settings/applications/new to register your instance.
|
||||
- In `Application name`, we advise you to set the same name as your fab-manager's instance title.
|
||||
- In `Homepage URL`, put the public URL where your fab-manager's instance is located (eg. https://example.com).
|
||||
- In `Authorization callback URL`, you must specify an URL that will match this scheme: https://example.com/users/auth/oauth2-github/callback
|
||||
- In `Authorization callback URL`, you must specify an URL that will match this scheme: https://example.com/users/auth/oauth2-github/callback
|
||||
- **example.com** is your own fab-manager's address
|
||||
- **oauth2-github** match the provider's "strategy name" in the fab-manager.
|
||||
It is composed of: **SSO's protocol**, _dash_, **slug of the provider's name**.
|
||||
- **oauth2-github** match the provider's "strategy name" in the fab-manager.
|
||||
It is composed of: **SSO's protocol**, _dash_, **slug of the provider's name**.
|
||||
If you have a doubt about what it will be, start by creating the authentication provider in your fab-manager (see below), then the strategy's name will be shown in the providers list.
|
||||
|
||||
- You'll be redirected to a page displaying two important informations: your **Client ID** and your **Client Secret**.
|
||||
|
||||
- You'll be redirected to a page displaying two important information: your **Client ID** and your **Client Secret**.
|
||||
|
||||
- Now go to your fab-manager's instance, login as an administrator, go to `Users management` and `Authentication`.
|
||||
Click `Add a new authentication provider`, and select _OAuth 2.0_ in the `Authentication type` drop-down list.
|
||||
@ -27,7 +27,7 @@ For this guide, we will use [GitHub](https://developer.github.com/v3/oauth/) as
|
||||
- Fulfill the form with the following parameters:
|
||||
- **Common URL**: `https://github.com/login/oauth/` This is the common part in the URLs of the two following parameters.
|
||||
- **Authorization endpoint**: `authorize` This URL can be found [here](https://developer.github.com/v3/oauth/).
|
||||
- **Token Acquisition Endpoint**: `access_token` This URL can be found [here](https://developer.github.com/v3/oauth/).
|
||||
- **Token Acquisition Endpoint**: `access_token` This URL can be found [here](https://developer.github.com/v3/oauth/).
|
||||
- **Profile edition URL**: `https://github.com/settings/profile` This is the URL where you are directed when you click on `Edit profile` in your GitHub dashboard.
|
||||
- **Client identifier**: Your Client ID, collected just before.
|
||||
- **Client secret**: Your Client Secret, collected just before.
|
||||
@ -40,23 +40,23 @@ For this guide, we will use [GitHub](https://developer.github.com/v3/oauth/) as
|
||||
- **API endpoint URL**: `https://api.github.com/user` Here you can set a complete URL **OR** only an endpoint referring to the previously set **Common URL**.
|
||||
- **API type**: `JSON` Only JSON API are currently supported
|
||||
- **API fields**: `id` According to the GitHub API documentation, this is the name of the JSON field which uniquely identify the user.
|
||||
|
||||
Once you have completed and validated the mapping's line, an information button will be available.
|
||||
|
||||
Once you have completed and validated the mapping's line, an information button will be available.
|
||||
A click on it will show you the type of data expected from the API and, in some cases, you'll be able to configure a transformation.
|
||||
For example, the `Profile.gender` field require a boolean attribute but your API may return strings like `man / woman`.
|
||||
In this case, you'll be able to configure a transformation for `man` <-> `true` and `woman` <-> `false`.
|
||||
|
||||
|
||||
Now, you are free to map more fields, like `Profile.github` to `html_url`, or `Profile.avatar` to `avatar_url`...
|
||||
|
||||
- Once you are done, your newly created authentication provider, will be marked as **Pending** in the authentication providers list.
|
||||
To set it as the current active provider, you must open a terminal on the hosting server (and/or container) and run the following commands:
|
||||
|
||||
|
||||
```bash
|
||||
# replace GitHub with the name of the provider you just created
|
||||
rake fablab:switch_auth_provider[GitHub]
|
||||
```
|
||||
|
||||
- As the command just prompted you, you have to re-compile the assets
|
||||
- As the command just prompted you, you have to re-compile the assets
|
||||
- In development, `rake tmp:clear` will do the job.
|
||||
- In production with Docker, `rm -rf public/assets`, followed by `docker-compose run --rm fabmanager bundle exec rake assets:precompile`
|
||||
- Then restart the web-server or the container.
|
||||
|
Loading…
x
Reference in New Issue
Block a user