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

Replace isTeam with new flags #39794

Merged
merged 38 commits into from
Apr 30, 2024
Merged

Conversation

mcbattirola
Copy link
Contributor

@mcbattirola mcbattirola commented Mar 25, 2024

Blocker: https://github.com/gravitational/cloud/pull/8611 being released

This PR removes the usage of isTeam, replacing it by a flag that represents each feature.

isTeam was used to enable/disable multiple features. Now, we're going to have one flag per feature instead of relying on the product.

These flags were introduced in #39695 and are already being sent by Cloud's API to Teleport

The translation table is:

questionnaire -> isTeam
isStripeManaged -> isTeam
externalAuditStorage -> !isTeam
premiumSupport -> !isTeam
joinActiveSessions -> !isTeam
accessRequests -> !isTeam
trustedDevices -> !isTeam
oidc -> !isTeam
saml -> !isTeam
mobileDeviceManagement -> !isTeam

The only isTeam usage left is to determine a marketing URL. This will require coordination with the marketing team to determine how to handle it. I've added a TODO on it and will fix in the future.

I've also removed the fields from lockedFeatures that were simple proxies from other properties and used those properties directly instead. Only kept in lockedFeatures values that require a more complex calculation than simply feature: !cfg.feature.

teleport.e PR: https://github.com/gravitational/teleport.e/pull/3781

More info can be found in https://github.com/gravitational/cloud/issues/8067

Contributes to https://github.com/gravitational/cloud/issues/8067

mcbattirola and others added 27 commits March 21, 2024 14:34
…ravitational/teleport into mcbattirola/remove-team--use-new-flags
@mcbattirola mcbattirola force-pushed the mcbattirola/remove-team--use-new-flags branch from e2a217d to 5701cbd Compare April 25, 2024 15:31
@mcbattirola mcbattirola force-pushed the mcbattirola/remove-team--use-new-flags branch from 5701cbd to 2bde5a4 Compare April 25, 2024 15:49
@mcbattirola mcbattirola force-pushed the mcbattirola/remove-team--use-new-flags branch from 5e385d4 to 380bff8 Compare April 25, 2024 18:27
Co-authored-by: Michelle Bergquist <[email protected]>
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from rudream April 29, 2024 17:50
@mcbattirola mcbattirola added this pull request to the merge queue Apr 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 29, 2024
@mcbattirola mcbattirola enabled auto-merge April 29, 2024 19:41
@mcbattirola mcbattirola added this pull request to the merge queue Apr 30, 2024
Merged via the queue into master with commit ddbd9ee Apr 30, 2024
44 checks passed
@mcbattirola mcbattirola deleted the mcbattirola/remove-team--use-new-flags branch April 30, 2024 12:12
mcbattirola added a commit that referenced this pull request May 6, 2024
* Add new flags to modules

* Add deprecated comments to isTeam

* Make support flag an enum

* Add a TODO instead of deprecating flag right away

Co-authored-by: Alan Parra <[email protected]>

* Add gogoproto.jsontag to new fields

* remove meaning from enum zero value

* Reuse proto.SupportType instead of suping

* Replace isTeam for new flags in web app

* Update proto file: rename enum 0 value to unspecified;fix json tag casing

* Reuse proto file instead of aliasing it

* undo removing method by accident

* Add MobileDeviceManagement field to web config struct

* Improve comments

* Fix tests

* Simplify lockedFeatures object

* Include JoinActiveSessions in the web config object

* Remove more instances of isTeam

* Apply suggestions from code review - improve comments

Co-authored-by: Michelle Bergquist <[email protected]>

* Use consistent comments to remove isTeam

* Update godocs comments

* Revert removign `isTeam` from stories it still should

* Fix godoc typo

Co-authored-by: Michelle Bergquist <[email protected]>

---------

Co-authored-by: Alan Parra <[email protected]>
Co-authored-by: Michelle Bergquist <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request May 13, 2024
* Add new flags to modules

* Add deprecated comments to isTeam

* Make support flag an enum

* Add a TODO instead of deprecating flag right away



* Add gogoproto.jsontag to new fields

* remove meaning from enum zero value

* Reuse proto.SupportType instead of suping

* Replace isTeam for new flags in web app

* Update proto file: rename enum 0 value to unspecified;fix json tag casing

* Reuse proto file instead of aliasing it

* undo removing method by accident

* Add MobileDeviceManagement field to web config struct

* Improve comments

* Fix tests

* Simplify lockedFeatures object

* Include JoinActiveSessions in the web config object

* Remove more instances of isTeam

* Apply suggestions from code review - improve comments



* Use consistent comments to remove isTeam

* Update godocs comments

* Revert removign `isTeam` from stories it still should

* Fix godoc typo



---------

Co-authored-by: Alan Parra <[email protected]>
Co-authored-by: Michelle Bergquist <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants