https://community.openproject.org/wp/64636
It's not very strict right now: you can still import the same token
twice if you add some garbage before and/or after, but it strips
whitespaces and for most customer scenarios, it should be enough.
Also even if the same token is added twice, it's not a big deal. It will
still work as expected.
This is a follow-up to the following commits:
- 299d611d27: Remove enterprise angular code
- 9357553e3f: Replace common/upsale with component
- 28434f7cc9: Remove enterprise_tokens/_current partial
That also removes the fixture tokens used in _current partial specs as
they're not used elsewhere.
https://community.openproject.org/wp/64635
This follows the design on Figma:
- 4 columns: subscription, active users, domain, dates
- subscription shows plan name, subscriber, and some labels depending on
the token validity and attributes
- the dates are highlighted if they have an influence on the token status
- invalid or expired tokens are ignored, only active tokens are
considered
- if there are active non-trial tokens, the trial tokens are ignored
- if there is an active token without any user restrictions (no
`active_user_count` key), there is no limit on the number of active
users
- the maximum allowed active users is computed by taking the maximum of
the `active_user_count` values of the active tokens
- if there are no tokens, there is no limit on the number of active
users
https://community.openproject.org/wp/64157
Instead of having one single token, we can now have multiple tokens.
They can have different plans, different trial/non-trial status, and
different activation dates.
This allows:
- to have a paid token for a plan, and a trial token for two weeks to
try out a higher plan.
- to have an existing token for a plan which will soon expire, and add
the token for the next period or a higher plan in parallel.
All tokens are listed on the same page in the administration.
As the `active?` logic was extracted out, it makes sense to re-use this newly created method. Thanks Oliver!
Co-authored-by: Oliver Günther <o.guenther@openproject.com>
The cached help menu needs to be invalidated once an EnterpriseToken is set or
removed in order to properly render upsales/set appropriate support links.
Otherwise, an outdated up-sale link and Enterprise Support link would still be
displayed even when the OpenProject version toggles between Community and Enterprise.
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.
Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
Uses FactoryBot to keep and maintain specific records in a special transaction that does not get removed after each spec.
They automatically are created whenever first hitting them.
This makes an excellent time saver for items that are commonly used, such as an admin user account