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

Switch listing team members view to read from Teams schemas #4802

Merged
merged 25 commits into from
Nov 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5eb8754
Modify test utils to use teams test factories
zoldar Nov 11, 2024
511f90a
Implement alternative routes for updating and removing membership
zoldar Nov 11, 2024
d34ef4c
Implement teams read adapter for listing site members and invitees
zoldar Nov 11, 2024
a18fca0
Use new teams read adapter for Settings > People view
zoldar Nov 11, 2024
089a1d7
Add `invitation_id` column to `guest_invitations` schema
zoldar Nov 11, 2024
ba97b70
Add `invitation_id` to `GuestInvitation` schema and populate it
zoldar Nov 11, 2024
aa5e7a2
Sync guest invitation's invitation ID instead of team invitation
zoldar Nov 11, 2024
735ed32
Expose guest invitation's invitation ID in sites list
zoldar Nov 11, 2024
216707c
Sync guest invitation invitation ID instead of team invitation in bac…
zoldar Nov 11, 2024
21aa3dd
Update team consistency check to account for guest invitation IDs
zoldar Nov 11, 2024
5573869
Remove workaround for no invitation ID on guest invitation in `list_p…
zoldar Nov 11, 2024
f7449a6
Merge branch 'master' into team-sync-journey-2
aerosol Nov 12, 2024
d5825c0
Test listing pending invitations
aerosol Nov 12, 2024
063e43d
Test listing memberships
aerosol Nov 12, 2024
4042a86
Format
aerosol Nov 12, 2024
59bc5e8
Test membership changes via new routes
aerosol Nov 12, 2024
9322a85
Remove old membership altering routes
aerosol Nov 12, 2024
4a27304
Clean up
aerosol Nov 12, 2024
05c47bd
Merge branch 'master' into team-sync-journey-2
aerosol Nov 12, 2024
a402eb2
Revert "Modify test utils to use teams test factories"
aerosol Nov 13, 2024
e57e1b5
Ensure test setup provisions teams for people listing
aerosol Nov 13, 2024
672429b
See if we can avoid exposing user id
aerosol Nov 13, 2024
cfca43d
Revert "See if we can avoid exposing user id"
aerosol Nov 13, 2024
124fbbc
Fix faulty member label in people list
zoldar Nov 13, 2024
116a514
Fix sites listing for a case of pending invite with existing pin
zoldar Nov 13, 2024
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
Prev Previous commit
Next Next commit
Fix faulty member label in people list
zoldar committed Nov 13, 2024
commit 124fbbc13c438c213baaedae08a66217a0256bfa
4 changes: 2 additions & 2 deletions lib/plausible/teams/adapter/read/sites.ex
Original file line number Diff line number Diff line change
@@ -144,8 +144,8 @@ defmodule Plausible.Teams.Adapter.Read.Sites do
ELSE ?
END
""",
tm.role,
tm.role
gm.role,
gm.role
)
}
)
4 changes: 4 additions & 0 deletions test/plausible_web/controllers/site_controller_test.exs
Original file line number Diff line number Diff line change
@@ -530,15 +530,19 @@ defmodule PlausibleWeb.SiteControllerTest do
text_of_element(resp, "#membership-#{user.id}")

editor_row = text_of_element(resp, "#membership-#{editor.id}")
editor_row_button = text_of_element(resp, "#membership-#{editor.id} button")
viewer_row = text_of_element(resp, "#membership-#{viewer.id}")
viewer_row_button = text_of_element(resp, "#membership-#{viewer.id} button")

assert owner_row =~ user.email
assert owner_row =~ "Owner"

assert editor_row =~ editor.email
assert editor_row_button == "Admin"
refute editor_row =~ "Owner"

assert viewer_row =~ viewer.email
assert viewer_row_button == "Viewer"
refute viewer_row =~ "Owner"
end