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

  1. Avoid passing/using License on the frontend
  2. Add permissions to current_user.can_do_thing
  3. For promotion banners that check License, use show_promotion_blah

What does success look like, and how can we measure that?

  1. Docs for adding EE-only features on frontend
  2. Docs for testing EE-only features on frontend

Links / references

https://docs.gitlab.com/ee/development/ee_features.html

Original Info ### Proposal
  1. Keep a license object in gon or window.gl
  2. When unlicensed, skip (or minimize) EE imports
  3. Document whatever we decide

<>/details>

Edited Aug 29, 2018 by Simon Knox
Assignee Loading
Time tracking Loading