Skip to content

Add buttons for subscription management

Angelo Gulina requested to merge ag-327248-buttons-fe into master

What does this MR do?

This MR is part of the work done to address gitlab-org/gitlab#327248. In this context, we're exposing the Customers Portal URL to the Vue app in order to later retrieve it and use it for the Manage button.

Expose Customers Portal URL to Vue app !61338 (merged)
Subscription Details Buttons 👈 you are here
License Remove Button and Modal tbd

A feature flag is not used because this feature is for self-managed instances. The feature is behind an Application Setting and it's not released nor documented. To test it locally, see the following steps.

To test the changes locally

  1. Delete any previous license you might have

  2. Make sure you have set the following environment vars (usually in your terminal) and restart gdk

    • GITLAB_LICENSE_MODE is set to test
    • CUSTOMER_PORTAL_URL is set to https://customers.stg.gitlab.com
  3. Use Rails console to run ApplicationSetting.current.update(cloud_license_enabled: true)

  4. To test a Legacy License (you should not have any another license), use this key:

eyJkYXRhIjoiREJGb0g2SzRpWTZwY2lBVXFyWTFkTUNhb3dZTS9hbWhCd0l2
ZEdTMnZTd3ZUazZvR2YvK3pNVzJWMW1RXG5Vcm9DU0lGeFlHOExBNC9hSzZ4
VVk1eEZCUkhhcmF0b09BK0lKWGZkaDdnbERwc2xwVkV6MGRvOVBSR3ZcbkVh
TENnV3k1RGV3Mk54UXNOSVpOMVI5b3F4NkliN3ZNL2JndnF0MzFGV21lVVA1
ZzBIU2lIZFlMRCsyeVxuZmJtcG5KNXRsY29TV0RhNTJGN0NCdTU0NGNMa1Nt
WjZnYi9VYkFoUExOMkZDTGR1REsxUGNxcXRCWThWXG5rWS9Kc0hFWDBMSFlV
OVVncTE4ZnJmRUt1UGw0TnoyVkdJV1BXOVJ1Y00wamhRWW1WSUczL1dqOUpN
VnZcbkR2bEdybmpybmdxZzVaUEdPL0V5SXAvL2sxVmtnQ3p5NnVFMTJnc3hx
M0pMWUNrZ01mMEJoNTlxSS9mNVxuSVRvVVlnbHUyRWRqczk0ZkRYaEFxeGdm
aUdwWng4MnNtUFNPVVFMUnFqMXZpeStLd00wN3dHSEJ4R2pCXG5oRDZSTC8y
dGI4Zi9iM2hheG02MEhJMkt3S2lYM3J3bU8rTVI1MWNYQzUvSUZIYU5uSUox
MlQyNTk5ckpcbko2QUQyVFM2dHE5L3QwMFN0eDczOWdKSjRxWDk2M0VOZEgz
VUFhemU5U0swbmppd0xRdzh5TCtCUGQ5QVxuMElCUFBISEZiUkhCVzlZd3k5
ayswSFNpKzZJalQ3NnNRd2h2TW9lMmRRUnpjOFlGNmJJWDU2V014bFpnXG5w
R1NHNTNFVnBia2Eza1U0YVNuTjYzOU1mdFN6QVF0amNZTmtQYXIzK1dOTFRU
YWY3ekJFeUJkV2pjVTBcbkg2SnVpN1VWWVd0TzNoanZYT3lDQm5DR0RyL2o3
eVVmUEo4cVpaM2pvNmVVSWVhYlh6SGZmTUovUnFHbFxuSG53TXFnPT1cbiIs
ImtleSI6IlVyemhZZU9mWTB1MzR0aGE5Tm1uSmdpb1BkeFlsK3lCbTNYajhh
WDV6elU0bzd4RHFJQWhIU3NReUh5Q1xuVlYzQ1lEYmtjZGd5T2hZdVNKUDNN
cjJsVi83ZHpjN1VQRTd0NFhIVmVVcXZtTm9DcVZycDhHMkZ5YkltXG5YQmRP
UnZMVVNVdkJ2Unc5dlhudTA4WXZ4Z0JqYTBjcEgrTGRvTS9ING5XSzJUSk9w
cGFnaXJtUFI5S1dcbjgzTzlvNmovMENwS3ArbUcwbzBzcFBqZjRxeWhqVEp2
YmRDOGlaUjYxZWswRFprZXhMKzFlNWZOV1VUN1xuMUY5VVhvajh6cnpibHZq
a3lrOXpiQlpQUnBYODRXZEVRVEQ3eWcvb0c4SjloVlQzZTlVYmRHZytuYmpU
XG5GWW9Zd2l4aTlaNGFPVHZmc1lSeWpONkxDNkdRUEpLaHRrQjU1ODdkcXc9
PVxuIiwiaXYiOiJCWXNSTjQ5alRsVTR2bVYzUEJDZGpBPT1cbiJ9
  1. To test a Cloud License, use this code: V6SCyxa5Gj1wmNVY65PnbBsc

Screenshots (strongly suggested)

Loading Cloud Type Legacy Type
Screenshot_2021-05-10_at_10.58.30 Screenshot_2021-05-10_at_10.57.02 Screenshot_2021-05-10_at_10.58.43

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Angelo Gulina

Merge request reports