For users with enterprise with inventory and enterpises with variant
tag, allow access to the inventory page and display variant tag only for
the enterprises its enabled for.
To make it easier to manage, enterprises with no inventory will have
variant tag enabled, and enterprises with inventory will have inventory
enabled.
Add migration to disable old group and enabled new group
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.
It fails in CI and features are not seen as enabled. So we copy the
important part of the test helper into our code, which works.
It's probably about the point in time when the adapter is instantiated.
So you can easily inspect and activate new features without trying to
use them first. It brings more visibility and will enable us to easily
remove retired features as well.
The initializer ran code the needs the database in the migrated state.
The decision is to not initialize anything relative to feature. This has to be done within the FlipperUI by the instance managers.
- Use the ActiveRecord adapter
- Use a middle to cache data through memoization (see https://github.com/jnunemaker/flipper/blob/master/docs/Optimization.md)
- Create the group `admins`: only user which are admins
- Create `unit_price` feature attached to `admins` group
- Add method `flipper_id` on User