Skip to content

Commit

Permalink
Merge branch 'dev' for release 6.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nflorentin committed Oct 2, 2023
2 parents 8cd04fc + 0129dc9 commit 5d42a73
Show file tree
Hide file tree
Showing 21 changed files with 257 additions and 224 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog Fab-manager

## v6.1.2 2023 October 2

- Fix a bug: minor pb (exception raised) when bot hit api/projects#search without beeing authenticated
- Fix a bug: minor pb (exception raised) when a bot or unauthenticated user hit api/auth_providers actions
- Fix a bug: when calling .to_json on an "avoir", there was a bug because order_number delegates on invoice which can be nil, it was causing errors in notifications rendering
- Fix a bug: when getting status of users/subscriptions export
- improvement : adds/edit spanish translations

## v6.1.1 2023 September 28

- Fix a bug: unable to sync projects with openprojects
Expand All @@ -10,8 +18,7 @@

- [TODO DEPLOY] `rails fablab:openlab:bulk_export`
- [TODO DEPLOY] `rails fablab:openlab:bulk_update`
- [TODO DEPLOY] `rails fablab:es:build_stats`
- [TODO DEPLOY] `rails fablab:maintenance:regenerate_statistics[2023,6]`
- [TODO DEPLOY] `rails fablab:maintenance:regenerate_statistics[2023,9]`

## v6.1.0 2023 September 25

Expand Down
2 changes: 2 additions & 0 deletions app/controllers/api/auth_providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# API Controller for resources of type AuthProvider
# AuthProvider are used to connect users through single-sign on systems
class API::AuthProvidersController < API::APIController
before_action :authenticate_user!
before_action :set_provider, only: %i[show update destroy]

def index
@providers = policy_scope(AuthProvider)
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/members_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def destroy
def export_subscriptions
authorize :export

export = ExportService.last_export('users/subscription')
export = ExportService.last_export('users/subscriptions')
if export.nil? || !FileTest.exist?(export.file)
@export = Export.new(category: 'users', export_type: 'subscriptions', user: current_user)
if @export.save
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def search
render :index
end
format.zip do
head :forbidden unless current_user.admin? || current_user.manager?
head :forbidden unless current_user && (current_user.admin? || current_user.manager?)

send_data ProjectsArchive.new(res[:projects]).call, filename: "projets.zip", disposition: 'attachment', type: 'application/zip'
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/avoir.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Avoir < Invoice

attr_accessor :invoice_items_ids

delegate :order_number, to: :invoice
delegate :order_number, to: :invoice, allow_nil: true

def expire_subscription
user.subscription.expire
Expand Down
4 changes: 2 additions & 2 deletions app/services/export_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def last_export(type, query = nil, key = nil, extension = nil)
last_export_members(query, key, extension)
when 'users/reservations'
last_export_reservations(query, key, extension)
when 'users/subscription'
when 'users/subscriptions'
last_export_subscriptions(query, key, extension)
when 'availabilities/index'
last_export_availabilities(query, key, extension)
Expand All @@ -19,7 +19,7 @@ def last_export(type, query = nil, key = nil, extension = nil)
when %r{statistics/.*}
last_export_statistics(type, query, key, extension)
else
raise TypeError "unknown export type: #{type}"
raise TypeError.new("unknown export type: #{type}")
end
end

Expand Down
174 changes: 87 additions & 87 deletions config/locales/app.admin.es.yml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions config/locales/app.logged.de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ de:
notify_admin_member_create_reservation: "A member books a reservation"
notify_admin_slot_is_modified: "A reservation slot has been modified"
notify_admin_slot_is_canceled: "A reservation has been cancelled"
notify_admin_reservation_validated: "A reservation has been validated"
notify_admin_reservation_invalidated: "A reservation has been invalidated"
notify_admin_member_pre_booked_reservation: "A pre-booking has been made"
notify_admin_subscribed_plan: "A subscription has been purchased"
notify_admin_subscription_will_expire_in_7_days: "A member subscription expires in 7 days"
notify_admin_subscription_is_expired: "A member subscription has expired"
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.logged.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ en:
notify_admin_member_create_reservation: "A member books a reservation"
notify_admin_slot_is_modified: "A reservation slot has been modified"
notify_admin_slot_is_canceled: "A reservation has been cancelled"
notify_admin_reservation_validated: "A reservation has been validated"
notify_admin_reservation_invalidated: "A reservation has been invalidated"
notify_admin_member_pre_booked_reservation: "A pre-booking has been made"
notify_admin_subscribed_plan: "A subscription has been purchased"
notify_admin_subscription_will_expire_in_7_days: "A member subscription expires in 7 days"
notify_admin_subscription_is_expired: "A member subscription has expired"
Expand Down
51 changes: 27 additions & 24 deletions config/locales/app.logged.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ es:
after_edition_info_html: "Una vez que tus datos estén actualizados, haz <strong>clic en el botón de sincronización que aparece a continuación</strong>, o <strong>desconéctate y vuelve a conectarte</strong> para que los cambios hagan efecto."
sync_profile: "Sincronizar mi perfil"
event_reservation_item:
event: "Event"
family: "Reserved for members"
nominative: "Nominative"
pre_registration: "Pre-registration"
NUMBER_normal_places_reserved: "{NUMBER} {NUMBER, plural, =0{} =1{normal place reserved} other{normal places reserved}}"
NUMBER_of_NAME_places_reserved: "{NUMBER} {NUMBER, plural, =0{} =1{of {NAME} place reserved} other{of {NAME} places reserved}}"
tracking_your_reservation: "Tracking your reservation"
in_the_process_of_validation: "In the process of validation"
settle_your_payment: "Come to the reception desk to settle"
paid: "Paid"
canceled: "Canceled"
registered: "Registered"
not_validated: "Not validated"
present: "Present"
event: "Evento"
family: "Reservado para los miembros"
nominative: "Nominativo"
pre_registration: "Preinscripción"
NUMBER_normal_places_reserved: "{NUMBER} {NUMBER, plural, =0{} =1{lugar normal reservado} other{lugares normales reservados}}"
NUMBER_of_NAME_places_reserved: "{NUMBER} {NUMBER, plural, =0{} =1{lugar {NAME} reservado} other{lugares {NAME} reservados}}"
tracking_your_reservation: "Seguimiento de su reserva"
in_the_process_of_validation: "En proceso de validación"
settle_your_payment: "Ven al mostrador de recepción para pagar"
paid: "Pagado"
canceled: "Cancelada"
registered: "Inscrito"
not_validated: "No validada"
present: "Presente"
dashboard:
#dashboard: public profile
profile:
Expand Down Expand Up @@ -170,18 +170,18 @@ es:
show_more: "Mostrar más"
cancelled_slot: "Cancelado"
reservations_panel_as_admin:
title: "Reservations"
title: "Reservas"
credits_panel:
title: "Mis créditos"
info: "Su suscripción incluye créditos gratuitos que puede utilizar al reservar"
remaining_credits_html: "Puede reservar {REMAINING} {REMAINING, plural, one{franja horaria} other{franjas horarias}} gratis."
used_credits_html: "Ya has utilizado <strong> {USED} {USED, plural, =0{crédito} one{crédito} other{créditos}}</strong>."
no_credits: "Aún no tienes créditos. Algunos abonos te permiten reservar franjas horarias gratuitamente."
credits_panel_as_admin:
title: "Credits"
remaining_credits_html: "{REMAINING} {REMAINING, plural, one{slot} other{slots}} can be booked for free."
used_credits_html: "<strong> {USED} {USED, plural, =0{credit} one{credit} other{credits}}</strong> already used."
no_credits: "No credits yet."
title: "Créditos"
remaining_credits_html: "{REMAINING} {REMAINING, plural, one{lugar} other{lugares}} pueden reservarse gratuitamente."
used_credits_html: "<strong> {USED} {USED, plural, =0{crédito} one{crédito} other{créditos}}</strong> ya utilisados."
no_credits: "Todavía no hay créditos."
prepaid_packs_panel:
title: "Mis paquetes de prepago"
name: "Nombre del paquete prepago"
Expand All @@ -195,7 +195,7 @@ es:
no_packs: "No hay paquetes de prepago disponibles para la venta"
reserved_for_subscribers_html: 'La compra de paquetes de prepago está reservada a los abonados. <a href="{LINK}">Suscríbete ahora</a> para beneficiarte.'
prepaid_packs_panel_as_admin:
title: "Prepaid packs"
title: "Paquetes de prepago"
#public profil of a member
members_show:
members_list: "Lista de miembros"
Expand Down Expand Up @@ -308,22 +308,25 @@ es:
app_management: "En cuanto a las notificaciones de gestión de aplicaciones"
notification_form:
notify_admin_when_user_is_created: "Se ha creado una cuenta de usuario"
notify_admin_child_created: "A child has been created"
notify_admin_child_created: "Se ha creado un niño"
notify_admin_when_user_is_imported: "Se ha importado una cuenta de usuario"
notify_admin_profile_complete: "Una cuenta importada ha completado su perfil"
notify_admin_user_merged: "Una cuenta importada se ha fusionado con una cuenta existente"
notify_admins_role_update: "El rol de un usuario ha cambiado"
notify_admin_import_complete: "Se realiza una importación"
notify_admin_user_group_changed: "Un usuario ha cambiado su grupo"
notify_admin_user_supporting_document_refusal: "Se ha rechazado un documento justificativo"
notify_admin_user_child_supporting_document_refusal: "A supporting document of child has been rejected"
notify_admin_user_child_supporting_document_refusal: "Se ha rechazado un documento justificativo de un niño"
notify_admin_user_supporting_document_files_created: "Un usuario ha cargado un documento justificativo"
notify_admin_user_supporting_document_files_updated: "Un usuario ha actualizado un documento justificativo"
notify_admin_user_child_supporting_document_files_created: "A child has uploaded a supporting document"
notify_admin_user_child_supporting_document_files_updated: "A child has updated a supporting document"
notify_admin_user_child_supporting_document_files_created: "Un niño ha cargado un documento justificativo"
notify_admin_user_child_supporting_document_files_updated: "Un niño ha actualizado un documento justificativo"
notify_admin_member_create_reservation: "Un miembro hace una reserva"
notify_admin_slot_is_modified: "Una franja de reserva ha sido modificada"
notify_admin_slot_is_canceled: "Una reserva ha sido cancelada"
notify_admin_reservation_validated: "A reservation has been validated"
notify_admin_reservation_invalidated: "A reservation has been invalidated"
notify_admin_member_pre_booked_reservation: "A pre-booking has been made"
notify_admin_subscribed_plan: "Se ha adquirido una suscripción"
notify_admin_subscription_will_expire_in_7_days: "Una suscripción de miembro caduca en 7 días"
notify_admin_subscription_is_expired: "La suscripción de un miembro ha expirado"
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.logged.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ fr:
notify_admin_member_create_reservation: "Un membre fait une réservation"
notify_admin_slot_is_modified: "Un créneau de réservation a été modifié"
notify_admin_slot_is_canceled: "Une réservation a été annulée"
notify_admin_reservation_validated: "Une réservation a été validée"
notify_admin_reservation_invalidated: "Une réservation a été invalidée"
notify_admin_member_pre_booked_reservation: "Une pré-réservation a été effectuée"
notify_admin_subscribed_plan: "Un abonnement a été souscrit"
notify_admin_subscription_will_expire_in_7_days: "L'abonnement d'un membre expire dans 7 jours"
notify_admin_subscription_is_expired: "L'abonnement d'un membre est arrivé à expiration"
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.logged.it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ it:
notify_admin_member_create_reservation: "Un membro ha prenotato"
notify_admin_slot_is_modified: "Uno slot di prenotazione è stato modificato"
notify_admin_slot_is_canceled: "Una prenotazione è stata annullata"
notify_admin_reservation_validated: "A reservation has been validated"
notify_admin_reservation_invalidated: "A reservation has been invalidated"
notify_admin_member_pre_booked_reservation: "A pre-booking has been made"
notify_admin_subscribed_plan: "Un abbonamento è stato acquistato"
notify_admin_subscription_will_expire_in_7_days: "Un abbonamento membro scade tra 7 giorni"
notify_admin_subscription_is_expired: "Un abbonamento membro è scaduto"
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.logged.no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@
notify_admin_member_create_reservation: "A member books a reservation"
notify_admin_slot_is_modified: "A reservation slot has been modified"
notify_admin_slot_is_canceled: "A reservation has been cancelled"
notify_admin_reservation_validated: "A reservation has been validated"
notify_admin_reservation_invalidated: "A reservation has been invalidated"
notify_admin_member_pre_booked_reservation: "A pre-booking has been made"
notify_admin_subscribed_plan: "A subscription has been purchased"
notify_admin_subscription_will_expire_in_7_days: "A member subscription expires in 7 days"
notify_admin_subscription_is_expired: "A member subscription has expired"
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.logged.pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ pt:
notify_admin_member_create_reservation: "Um membro agendou uma reserva"
notify_admin_slot_is_modified: "Um slot de reserva foi modificado"
notify_admin_slot_is_canceled: "Uma reserva foi cancelada"
notify_admin_reservation_validated: "A reservation has been validated"
notify_admin_reservation_invalidated: "A reservation has been invalidated"
notify_admin_member_pre_booked_reservation: "A pre-booking has been made"
notify_admin_subscribed_plan: "Uma assinatura foi comprada"
notify_admin_subscription_will_expire_in_7_days: "A assinatura de um membro expira em 7 dias"
notify_admin_subscription_is_expired: "A assinatura de um membro expirou"
Expand Down
3 changes: 3 additions & 0 deletions config/locales/app.logged.zu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ zu:
notify_admin_member_create_reservation: "crwdns37283:0crwdne37283:0"
notify_admin_slot_is_modified: "crwdns37285:0crwdne37285:0"
notify_admin_slot_is_canceled: "crwdns37287:0crwdne37287:0"
notify_admin_reservation_validated: "crwdns38108:0crwdne38108:0"
notify_admin_reservation_invalidated: "crwdns38110:0crwdne38110:0"
notify_admin_member_pre_booked_reservation: "crwdns38112:0crwdne38112:0"
notify_admin_subscribed_plan: "crwdns37289:0crwdne37289:0"
notify_admin_subscription_will_expire_in_7_days: "crwdns37291:0crwdne37291:0"
notify_admin_subscription_is_expired: "crwdns37293:0crwdne37293:0"
Expand Down
Loading

0 comments on commit 5d42a73

Please sign in to comment.