easier check for EE features from Vue
Problem to solve
We currently don't have an easy way to test for licenses/features like in Rails/Haml-land.
in haml: we can use License.feature_available?
For vue we would need to pass to data attribute in template, and add extra props to top level components for every licensed feature we need.
Proposal
- Avoid passing/using
License
on the frontend - Add permissions to
current_user.can_do_thing
- For promotion banners that check License, use
show_promotion_blah
What does success look like, and how can we measure that?
- Docs for adding EE-only features on frontend
- Docs for testing EE-only features on frontend
Links / references
https://docs.gitlab.com/ee/development/ee_features.html
Original Info
### Proposal- Keep a
license
object ingon
orwindow.gl
- When unlicensed, skip (or minimize) EE imports
- Document whatever we decide
<>/details>
Edited by Simon Knox