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

Add Haddock for TeamBinding #3087

Merged
merged 1 commit into from
Feb 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions libs/wire-api/src/Wire/API/Team.hs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,22 @@ instance ToSchema Team where
<*> _teamBinding .= (fromMaybe Binding <$> optField "binding" schema)
<*> _teamSplashScreen .= (fromMaybe DefaultIcon <$> optField "splash_screen" schema)

-- | How a team "binds" its members (users)
--
-- A `Binding` team is the normal team which we see in the UI. A user is
-- on-boarded as part of the team. If the team gets deleted/suspended the user
-- gets deleted/suspended.
--
-- A `NonBinding` team is a concept only in the backend. It is a team someone
-- can create and someone who has an account on Wire can join that team. This
-- way, in theory, one person can join many teams. This concept never made it as
-- a concept of product, but got used a lot of writing integration tests. Newer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-- a concept of product, but got used a lot of writing integration tests. Newer
-- a concept of product, but got used a lot for writing integration tests. Newer

-- features don't really work well with this and sometimes we have to rewrite
-- parts of the tests to use `Binding` teams.
--
-- Please try to not use `NonBinding` teams in tests anymore. In future, we
-- would like it to be deleted, but it is hard to delete because it requires a
-- bunch of tests to be rewritten.
data TeamBinding
= Binding
| NonBinding
Expand Down