mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +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
|
@ -16,12 +16,15 @@ import (
|
|||
"github.com/pomerium/pomerium/pkg/grpc/directory"
|
||||
)
|
||||
|
||||
// A Group is a directory Group.
|
||||
type Group = directory.Group
|
||||
|
||||
// A User is a directory User.
|
||||
type User = directory.User
|
||||
|
||||
// A Provider provides user group directory information.
|
||||
type Provider interface {
|
||||
UserGroups(ctx context.Context) ([]*User, error)
|
||||
UserGroups(ctx context.Context) ([]*Group, []*User, error)
|
||||
}
|
||||
|
||||
// GetProvider gets the provider for the given options.
|
||||
|
@ -101,6 +104,6 @@ func GetProvider(options *config.Options) Provider {
|
|||
|
||||
type nullProvider struct{}
|
||||
|
||||
func (nullProvider) UserGroups(ctx context.Context) ([]*User, error) {
|
||||
return nil, nil
|
||||
func (nullProvider) UserGroups(ctx context.Context) ([]*Group, []*User, error) {
|
||||
return nil, nil, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue