2176 Commits

Author SHA1 Message Date
Maikel Linke
e91fab5702 Remove legacy config for secret key 2025-12-19 14:22:25 +11:00
Maikel Linke
e09853af0c Replace deprecated Rails secrets
Use new credentials interface.
2025-12-19 13:28:05 +11:00
Maikel
1029b61bb0 Merge pull request #13742 from mkllnk/market-organic
Add Market Organic as available platform
2025-11-28 12:15:57 +11:00
Maikel Linke
f58b6bcada Show reset tasks in task list ./bin/rails -T
I wrote them a while ago but noticed only now that they don't show up in
the overview.
2025-11-24 12:59:41 +11:00
Maikel Linke
3c1313bfa0 Add Market Organic as available platform 2025-11-21 14:16:47 +11:00
Gaetan Craig-Riou
0745028c06 Fix checking if variant tag is enabled
variant_tag feature check should happen per enterprise basis, but we
still want super admin to so see variant tag. To do so we check if the
user is amdin or if any of the current user enterprise has variant tag
enable.
2025-11-10 11:14:56 +11:00
Maikel Linke
5dfb7645cb Avoid enabling rubocop rule listed in todo file 2025-10-31 15:39:58 +11:00
François Turbelin
71dd398131 Apply cosmetics and fix specs 2025-10-31 15:20:44 +11:00
François Turbelin
245f0caedb Adjust sum for remaining reports 2025-10-31 15:20:44 +11:00
François Turbelin
18bc95c6a3 Update sum calculation in order_cycle_customer_totals spec 2025-10-31 15:20:44 +11:00
David Rodríguez
4c6d894bc0 Bump RuboCop to 1.86.6
There were a few changes needed:

* Plugins are now specified through `plugin:` config keyword.
* All plugin gems need to be specified explicitly in Gemfile since they
  are no longer dependencies of plugins already specified explicitly.
* All plugin gems need to be updated in other to use the new APIs.
* One cop was renamed.
* New offenses safe to correct were corrected directly with `bundle exec
  rubocop -a`.
* New offenses unsafe to correct were added to the TODO configuration
  with `bundle exec rubocop --auto-gen-config --auto-gen-only-exclude
  --exclude-limit 1400 --no-auto-gen-timestamp`.
2025-10-27 11:30:33 +01:00
Maikel Linke
2780ae78f7 Add CQCM production servers 2025-10-10 16:18:21 +11:00
Maikel Linke
51a3085452 Add CQCM staging server to platforms 2025-10-10 16:18:21 +11:00
Gareth
417011909c Removed other filter rows. They weren't working and maybe not even relevant. The idea was to include order cycles and distributor ids as well, but it wasn't really requested so I'm taking it out. 2025-10-07 11:01:55 -04:00
Gareth Rogers
f414e04dea Merge branch 'master' into add-report-name-and-details 2025-10-01 09:54:51 -04:00
Gareth Rogers
0a9eb173ea Add report name and details to CSV files 2025-10-01 13:59:43 +10:00
Ahmed Ejaz
ac06126f59 replace cvv_response_message usage with redirect_auth_url 2025-09-22 11:55:43 +05:00
Ahmed Ejaz
626b802ea7 add redirect_auth_url column and replace cvv_response_message for redirection
- Added redirect_auth_url column to spree_payments table
- Updated payment redirection logic to use redirect_auth_url instead of cvv_response_message
- Cleans up old monkeypatch usage and improves Stripe checkout reliability
2025-09-22 11:54:20 +05:00
Filipe
273f78b214 Merge pull request #13530 from mkllnk/hub-address-feature
Remove retired hub_address feature
2025-09-16 17:23:42 +01:00
Filipe
bd1d9892a2 Merge pull request #13487 from rioug/security-241-fix-url-sanitization
Fix url sanitization for Stripe authorisation URL
2025-09-16 16:40:11 +01:00
Maikel Linke
d916ed2c96 Remove retired hub_address feature 2025-09-10 09:59:47 +10:00
Gaetan Craig-Riou
1f15f094ce Per review, check the URL is from a stripe subdomain 2025-09-08 11:00:11 +10:00
Maikel Linke
244a88a1cd Removed unused user from report classes
We needed them for a feature toggle that doesn't exist anymore.
2025-09-05 14:29:01 +10:00
Gaetan Craig-Riou
118e18a78e Tighten url validation
Per recommendation from https://github.com/openfoodfoundation/openfoodnetwork/security/code-scanning/241
2025-08-13 22:27:42 +10:00
Maikel Linke
1d2115766a Show product groups to platform user
I removed the caching of `managed_enterprises` in Permissions because
it's just a scope and calling it again is very cheap. And that makes the
method a lot easier to read now that we have a conditional here.

Accessing the managed enterprises via the user instead of a separate
scope on the Enterprise model also reduce the SQL queries. We may want
to use this method in more places. I prefer to keep the
admin-conditional in a permissions class instead of in the model.
2025-08-13 15:06:31 +10:00
Maikel
8491a167ed Merge pull request #13350 from mkllnk/dfc-ui
Add permission module with example data
2025-08-13 10:00:53 +10:00
David Cook
459d25e533 Merge pull request #13447 from mkllnk/cover-rake
Report code coverage on rake tasks
2025-08-12 09:37:51 +10:00
Maikel Linke
f65e4797cf Add feature toggle for DFC dev platform 2025-08-08 14:00:40 +10:00
Filipe
76aebf8a72 Merge pull request #13436 from chahmedejaz/task/13432-decommission-old-products-screen
Decommission Old Products UI and Related Code
2025-08-07 17:39:43 +02:00
Maikel Linke
2555a9e710 Ignore breaking code coverage for coverage spec
When we test our code coverage compilation, it breaks the code coverage
report for the current rspec process. By running that code separately,
we gain a correct coverage report for the rest of the code again.

So unfortunately, we can't report on the code coverage of this
particular task and have to ignore it. But at least CI depends on the
correct function of this task and would fail if it didn't work.
2025-08-05 12:45:05 +10:00
Maikel Linke
c0924fbe5e Use new Undercover formatter for :nocov: support 2025-07-31 14:56:17 +10:00
David Cook
60ac1c9fbe Merge pull request #13414 from mkllnk/remove-unused-hub
Remove unused instance variable
2025-07-28 09:22:15 +10:00
Ahmed Ejaz
acfe3f6589 Remove admin_style_v3 feature toggle and related conditional logic 2025-07-27 07:20:16 +05:00
Maikel Linke
667b49b7f1 Show hub address for pickup only when feature enabled 2025-07-24 15:24:32 +10:00
Maikel Linke
f0dd1885c9 Fix: Check feature toggle for hub early 2025-07-24 13:41:26 +10:00
Maikel Linke
05b6200c8f Remove unused instance variable
I noticed this when reviewing another pull request.
2025-07-24 13:37:14 +10:00
Gaetan Craig-Riou
618d597f6d ScopeVariantToHub require an Enterprise object
The hub parameter is used to check if inventory is enabled, so it breaks
if we just pass an id
2025-07-09 13:43:18 +10:00
Gaetan Craig-Riou
b7f969eed9 Move the inventory feature check to ScopeVariantToHub
Per review, the check is done on the same enterprise as the one use to
initialize ScopeVariantToHub. So it makes sense to move the actual
feature check to ScopeVariantToHub#scope
2025-07-09 13:43:12 +10:00
Gaetan Craig-Riou
b28e30cb6c Inventory is disabled by default
It will be enabled on release for existing Enterprises, we can use the
added group "enterprise_created_before_2025_07_04" to do so.
2025-07-09 11:35:27 +10:00
Gaetan Craig-Riou
681eee9309 Scope variant only when inventory is enabled
This wasn't pick up our specs, so I am not actually sure it's
usefull.Still for consistency sake we don't want to scope if inventory
is disabled
2025-07-09 11:35:26 +10:00
Gaetan Craig-Riou
6937a133ae Move inventory enabled check to OpenFoodNetwork::ScopeVariantToHub 2025-07-09 11:35:26 +10:00
Gaetan Craig-Riou
28a11f1fee Enabled inventory by default
Currently inventory is enabled by default, but we enventually want to
disabled it by default. So we disable inventory for specs, it will be
enabled on specific specs to test inventory related code path.
2025-07-09 11:35:26 +10:00
Gaetan Craig-Riou
8829f6ad03 Only scope variant when inventory is enabled 2025-07-09 11:35:26 +10:00
Gaetan Craig-Riou
cd8b7cd239 First step disable inventory 2025-07-09 11:35:26 +10:00
Filipe
affb5d7281 Merge pull request #13338 from chahmedejaz/task/13287-add-producer-seller-ability-to-edit-orders
Allow producer who are also seller to edit their products on hubs' orders
2025-07-04 14:26:39 +01:00
filipefurtad0
1478990eac Removes fake method and spec 2025-06-27 12:29:32 +01:00
filipefurtad0
75e0a71e10 Adds a fake method with no test coverage to test Undercover gem 2025-06-27 12:24:25 +01:00
filipefurtad0
4cb9d870b4 Changes rake task to include merging of the lcov result files 2025-06-27 12:24:22 +01:00
Ahmed Ejaz
765ce68c11 Add order_id to order controller, variant autocomplete, and search parameters for improved order management 2025-06-21 16:19:31 +05:00
Ahmed Ejaz
8d407b1dc9 Fix lint issues 2025-06-21 16:19:31 +05:00