Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include plan alias in token information #42828

Open
Tracked by #41116
dpsutton opened this issue May 17, 2024 · 0 comments
Open
Tracked by #41116

Include plan alias in token information #42828

dpsutton opened this issue May 17, 2024 · 0 comments

Comments

@dpsutton
Copy link
Contributor

dpsutton commented May 17, 2024

We want to include plan alias in the token information so that we can use it in the upsell badging.

See
https://github.com/metabase/harbormaster/pull/4993/commits/462da5a91c33f2a7662ed15de1ac83b99da2c859 for the shape. Just a string on the key :plan-alias.

This is already the case. The token-status setting is visible to admins. We only show the upsell information to admins, so that information is already on the FE.

❯ http get "localhost:3000/api/session/properties" Cookie:$SESSION -pb | jq '."token-status"."plan-alias"'
"internal"

If you don't see it yet, add

modified   deps.edn
@@ -262,6 +262,7 @@
                  "-Dfile.encoding=UTF-8"
                  "-Duser.language=en"
                  "-Duser.country=US"
+                 "-Dmetastore.dev.server.url=https://token-check.staging.metabase.com/"
                  ;; Allow clojure goes fast tooling to work
                  "-Djdk.attach.allowAttachSelf"
                  ;; This will suppress the warning about dynamically loaded agents (like clj-memory-meter)

To your deps.edn file under the :dev alias.

And perhaps we should also document it in the malli schema

modified   src/metabase/public_settings/premium_features.clj
@@ -102,6 +102,7 @@
   [:map
    [:valid                          :boolean]
    [:status                         [:string {:min 1}]]
+   [:plan-alias    {:optional true} :string]
    [:error-details {:optional true} [:maybe [:string {:min 1}]]]
    [:features      {:optional true} [:sequential [:string {:min 1}]]]
    [:trial         {:optional true} :boolean]
@@ -118,6 +119,15 @@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant