bump reva

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2024-04-04 16:26:34 +02:00
parent 9bcb949813
commit 0e680f31e4
5 changed files with 22 additions and 4 deletions
@@ -47,6 +47,7 @@ type Config struct {
ListOCMShares bool `mapstructure:"list_ocm_shares"`
Notifications map[string]interface{} `mapstructure:"notifications"`
IncludeOCMSharees bool `mapstructure:"include_ocm_sharees"`
ShowEmailInResults bool `mapstructure:"show_email_in_results"`
}
// Init sets sane defaults
@@ -40,6 +40,7 @@ type Handler struct {
gatewayAddr string
additionalInfoAttribute string
includeOCMSharees bool
showUserEmailInResults bool
}
// Init initializes this and any contained handlers
@@ -47,6 +48,7 @@ func (h *Handler) Init(c *config.Config) {
h.gatewayAddr = c.GatewaySvc
h.additionalInfoAttribute = c.AdditionalInfoAttribute
h.includeOCMSharees = c.IncludeOCMSharees
h.showUserEmailInResults = c.ShowEmailInResults
}
// FindSharees implements the /apps/files_sharing/api/v1/sharees endpoint
@@ -123,6 +125,21 @@ func (h *Handler) FindSharees(w http.ResponseWriter, r *http.Request) {
}
}
if !h.showUserEmailInResults {
for _, m := range userMatches {
m.Value.ShareWithAdditionalInfo = m.Value.ShareWith
}
for _, m := range exactUserMatches {
m.Value.ShareWithAdditionalInfo = m.Value.ShareWith
}
for _, m := range groupMatches {
m.Value.ShareWithAdditionalInfo = m.Value.ShareWith
}
for _, m := range exactGroupMatches {
m.Value.ShareWithAdditionalInfo = m.Value.ShareWith
}
}
response.WriteOCSSuccess(w, r, &conversions.ShareeData{
Exact: &conversions.ExactMatchesData{
Users: exactUserMatches,