diff --git a/go.mod b/go.mod index 0d74ad4863..2fdb36d86d 100644 --- a/go.mod +++ b/go.mod @@ -87,7 +87,6 @@ require ( go 1.16 replace ( - github.com/cs3org/go-cs3apis => github.com/ishank011/go-cs3apis v0.0.0-20211026072245-95303cdc06dc github.com/eventials/go-tus => github.com/andrewmostello/go-tus v0.0.0-20200314041820-904a9904af9a github.com/oleiade/reflections => github.com/oleiade/reflections v1.0.1 google.golang.org/grpc => google.golang.org/grpc v1.26.0 // temporary downgrade diff --git a/go.sum b/go.sum index 911fbb67e0..ae31f5ef35 100644 --- a/go.sum +++ b/go.sum @@ -438,8 +438,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/ishank011/go-cs3apis v0.0.0-20211026072245-95303cdc06dc h1:S2KTqUo/trscihgP250SJoXA+JRVNIk/FWXIgFy32D0= -github.com/ishank011/go-cs3apis v0.0.0-20211026072245-95303cdc06dc/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= github.com/jedib0t/go-pretty v4.3.0+incompatible h1:CGs8AVhEKg/n9YbUenWmNStRW2PHJzaeDodcfvRAbIo= github.com/jedib0t/go-pretty v4.3.0+incompatible/go.mod h1:XemHduiw8R651AF9Pt4FwCTKeG3oo7hrHJAoznj9nag= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= diff --git a/pkg/user/user.go b/pkg/user/user.go index 16e7bf57a6..15e952959b 100644 --- a/pkg/user/user.go +++ b/pkg/user/user.go @@ -28,8 +28,14 @@ import ( // Manager is the interface to implement to manipulate users. type Manager interface { plugin.Plugin + // GetUser returns the user metadata identified by a uid. + // The groups of the user are omitted if specified, as these might not be required for certain operations + // and might involve computational overhead. GetUser(ctx context.Context, uid *userpb.UserId, skipFetchingGroups bool) (*userpb.User, error) + // GetUserByClaim returns the user identified by a specific value for a given claim. GetUserByClaim(ctx context.Context, claim, value string, skipFetchingGroups bool) (*userpb.User, error) + // GetUserGroups returns the groups a user identified by a uid belongs to. GetUserGroups(ctx context.Context, uid *userpb.UserId) ([]string, error) + // FindUsers returns all the user objects which match a query parameter. FindUsers(ctx context.Context, query string, skipFetchingGroups bool) ([]*userpb.User, error) }