Skip to content

[cloud] Set org creation user tag by site admins

Administrator requested to merge CLOUD-167 into main

Created by: kopancek

Description

This allows site admins to toggle organization creation user tag. The user tag guards the org creation feature in both UI and graphql endpoints.

Since this is mostly going to be used to guard organization creation in early access of Cloud for small organizations, I don't think we should put in effort for testing. This is mostly throwaway work once we release GA.

Related Jira issue

https://sourcegraph.atlassian.net/browse/CLOUD-167

Screenshots

Screenshot 2021-12-21 at 17 39 43 Screenshot 2021-12-21 at 17 39 50

Testing locally

  1. Run sg in dotcom mode
  2. Go to Site-admin -> Users
  3. You should now see a new button in each row a. If a user does have CreateOrg user tag, the button should have a label Disable org creation b. Otherwise the button should have a label Enable org creation
  4. Clicking on the button is toggling the user tag for the user in Postgres
  5. After toggling org creation ON, the user should be able to see New organization button in user settings sidebar

Merge request reports

Loading