Skip to content

Limited access mode - way to store and check UI permissions

Created by: unclejustin

After sync discussion with @vovakulikov we need a simple single source of truth for updating the UI based on some condition.

Presently this is just the limited access mode disabling certain elements, and restricting quantities of others, but this will very quickly expand to more and more rules. Think access restrictions inside an organization or special requests for some prospect from marketing.

We'll start with a hook (useUIFeatures?) that pulls in the license check and returns an object. For this issue the object will simply have a licensed property.

The license check simple runs a GraphQL request with Apollo, so we should make sure this is pulling from cache first.

Related to https://github.com/sourcegraph/sourcegraph/issues/30165