mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-24 22:49:06 -06:00
Implement CS3 stub for /users/{userid}/groups
Up to now when using the CS3 backend (e.g. to use an external LDAP
server) queries to /users/{userid}/groups just errored out. This add a
simple stub to just return and empty group list for now.
This allows using and external LDAP server without having to fiddle with
the proxy configuration to redirect to the reva ocs implementation.
(Which also is just returning an empty group list currently)
This commit is contained in:
@@ -30,6 +30,11 @@ func (o Ocs) ListUserGroups(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
var account *accountsmsg.Account
|
||||
|
||||
if o.config.AccountBackend == "cs3" {
|
||||
o.mustRender(w, r, response.DataRender(&data.Groups{}))
|
||||
return
|
||||
}
|
||||
|
||||
// short circuit if there is a user already in the context
|
||||
if u, ok := revactx.ContextGetUser(r.Context()); ok {
|
||||
// we are not sure whether the current user in the context is the admin or the authenticated user.
|
||||
|
||||
Reference in New Issue
Block a user