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

Tidy up partner role. #592

Merged
merged 3 commits into from
Jan 23, 2019
Merged

Tidy up partner role. #592

merged 3 commits into from
Jan 23, 2019

Conversation

fisx
Copy link
Contributor

@fisx fisx commented Jan 23, 2019

This changes will mess with staging only, since none of the features touched have seen master yet. All changes have been agreed on with the other teams.

  1. json representation of TeamMember will look more like the one of Invitation, i.e. instead of { invited: { by: , at: }, it will contain { created_by: , created_at: }.
  2. collaborator will disappear from everywhere, and partner will be used instead. (when you send collaborator, the backend will hear "partner", but when you expect to receive collaborator, you are in trouble.

@fisx
Copy link
Contributor Author

fisx commented Jan 23, 2019

all integration tests pass locally.

@@ -6,6 +6,8 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}

{-# OPTIONS_GHC -Wno-orphans #-}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you write what instance this is needed for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, it's not. the instance popped up there briefly as quantum noise only. ok if i'll remove it in a separate PR to get this merged two hours earlier?

where
invmetaJson :: (UserId, UTCTimeMillis) -> Value
invmetaJson (by, at) = object [ "by" .= by, "at" .= at ]
[ "created_by" .= (fst <$> _invitation m) ] <>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a non-breaking change?

Copy link
Contributor

Choose a reason for hiding this comment

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

All changes have been agreed on with the other teams.

Oh okay.

@@ -515,13 +513,16 @@ parseTeamMember :: Value -> Parser TeamMember
parseTeamMember = withObject "team-member" $ \o ->
TeamMember <$> o .: "user"
<*> o .: "permissions"
<*> (parseInv =<< (o .:? "invited"))
Copy link
Contributor

Choose a reason for hiding this comment

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

So the "invited" field is not present anymore?

Copy link
Contributor

Choose a reason for hiding this comment

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

All changes have been agreed on with the other teams.

Oh also okay.

@neongreen
Copy link
Contributor

neongreen commented Jan 23, 2019 via email

@fisx fisx merged commit c3888f5 into develop Jan 23, 2019
@fisx fisx deleted the fisx-tidy-up-partner-role-part-1 branch January 23, 2019 16:46
@fisx fisx mentioned this pull request Jan 24, 2019
fisx added a commit that referenced this pull request Jan 26, 2019
as promised here: #592 (comment)
fisx added a commit that referenced this pull request Jan 28, 2019
* Cleanup

as promised here: #592 (comment)

* Swagger: update docs, remove dead code.
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

Successfully merging this pull request may close these issues.

None yet

2 participants