mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-19 20:17:30 +02:00
directory.Group entry for groups (#1118)
* store directory groups separate from directory users * fix group lookup, azure display name * remove fields restriction * fix test * also support email * use Email as name for google' * remove changed file * show groups on dashboard * fix test * re-add accidentally removed code
This commit is contained in:
parent
489cdd8b63
commit
1ad243dfd1
25 changed files with 525 additions and 209 deletions
|
@ -93,14 +93,20 @@ func Test(t *testing.T) {
|
|||
PersonalAccessToken: "xyz",
|
||||
}),
|
||||
)
|
||||
users, err := p.UserGroups(context.Background())
|
||||
groups, users, err := p.UserGroups(context.Background())
|
||||
assert.NoError(t, err)
|
||||
testutil.AssertProtoJSONEqual(t, `[
|
||||
{ "id": "github/user1", "groups": ["1", "2", "3", "team1", "team2", "team3"] },
|
||||
{ "id": "github/user2", "groups": ["1", "3", "team1", "team3"] },
|
||||
{ "id": "github/user3", "groups": ["3", "team3"] },
|
||||
{ "id": "github/user4", "groups": ["4", "team4"] }
|
||||
{ "id": "github/user1", "groupIds": ["1", "2", "3"] },
|
||||
{ "id": "github/user2", "groupIds": ["1", "3"] },
|
||||
{ "id": "github/user3", "groupIds": ["3"] },
|
||||
{ "id": "github/user4", "groupIds": ["4"] }
|
||||
]`, users)
|
||||
testutil.AssertProtoJSONEqual(t, `[
|
||||
{ "id": "1", "name": "team1" },
|
||||
{ "id": "2", "name": "team2" },
|
||||
{ "id": "3", "name": "team3" },
|
||||
{ "id": "4", "name": "team4" }
|
||||
]`, groups)
|
||||
}
|
||||
|
||||
func mustParseURL(rawurl string) *url.URL {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue