Skip to content

Add `push_frontend_abilities` so frontend can see ability checks

Jessie Young requested to merge jy-push-frontend-abilities into master

What does this MR do and why?

push_frontend_feature_flag(:my_feature, project)checks for a feature flag on a resource. push_licensed_feature(:my_feature_name, project) checks for a licensed feature on a resource. In vue templates, both of these are checked with the same method: this.glFeatures.myFeature

This MR addis push_frontend_ability(ability:, resource: :global, user:), which exposes ability checks to javascript templates.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports