mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-01 18:01:23 -05:00
@@ -3,3 +3,4 @@ Enhancement: Bump reva version
|
||||
use latest reva version
|
||||
|
||||
https://github.com/owncloud/ocis/pull/5243
|
||||
https://github.com/owncloud/ocis/pull/5285
|
||||
|
||||
2
go.mod
2
go.mod
@@ -11,7 +11,7 @@ require (
|
||||
github.com/blevesearch/bleve/v2 v2.3.5
|
||||
github.com/coreos/go-oidc/v3 v3.4.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20221219152307-4d5800e63bf4
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20221223093348-3ae37de4759d
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/ggwhite/go-masker v1.0.9
|
||||
github.com/go-chi/chi/v5 v5.0.7
|
||||
|
||||
2
go.sum
2
go.sum
@@ -345,6 +345,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965 h1:y4n2j68LLnvac
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20221219152307-4d5800e63bf4 h1:FxPCpd3oE5snNw5filxKGd3M27ySbjqeiiMTBJI8tSw=
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20221219152307-4d5800e63bf4/go.mod h1:GpocVB1w6yxeSr1VBsO9jztmt1SyNC4lCwudLwDzxHQ=
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20221223093348-3ae37de4759d h1:8CzNOyGaqIDv3rlYGYxv8TIYVHPBLkPmyTprlOh1Om4=
|
||||
github.com/cs3org/reva/v2 v2.12.1-0.20221223093348-3ae37de4759d/go.mod h1:GpocVB1w6yxeSr1VBsO9jztmt1SyNC4lCwudLwDzxHQ=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
|
||||
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
|
||||
@@ -33,10 +33,10 @@ func (g Graph) GetTags(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
tagList := tags.FromList("")
|
||||
tagList := tags.New("")
|
||||
for _, match := range sr.Matches {
|
||||
for _, tag := range match.Entity.Tags {
|
||||
tagList.AddList(tag)
|
||||
tagList.Add(tag)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,9 +100,8 @@ func (g Graph) AssignTags(w http.ResponseWriter, r *http.Request) {
|
||||
currentTags = m["tags"]
|
||||
}
|
||||
|
||||
allTags := tags.FromList(currentTags)
|
||||
newTags := strings.Join(assignment.Tags, ",")
|
||||
if !allTags.AddList(newTags) {
|
||||
allTags := tags.New(currentTags)
|
||||
if !allTags.Add(assignment.Tags...) {
|
||||
errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "no new tags in createtagsrequest or maximum reached")
|
||||
return
|
||||
}
|
||||
@@ -123,7 +122,7 @@ func (g Graph) AssignTags(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if g.eventsPublisher != nil {
|
||||
ev := events.TagsAdded{
|
||||
Tags: newTags,
|
||||
Tags: strings.Join(assignment.Tags, ","),
|
||||
Ref: &provider.Reference{
|
||||
ResourceId: &rid,
|
||||
Path: ".",
|
||||
@@ -190,9 +189,8 @@ func (g Graph) UnassignTags(w http.ResponseWriter, r *http.Request) {
|
||||
currentTags = m["tags"]
|
||||
}
|
||||
|
||||
allTags := tags.FromList(currentTags)
|
||||
toDelete := strings.Join(unassignment.Tags, ",")
|
||||
if !allTags.RemoveList(toDelete) {
|
||||
allTags := tags.New(currentTags)
|
||||
if !allTags.Remove(unassignment.Tags...) {
|
||||
errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "no new tags in createtagsrequest or maximum reached")
|
||||
return
|
||||
}
|
||||
@@ -213,7 +211,7 @@ func (g Graph) UnassignTags(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if g.eventsPublisher != nil {
|
||||
ev := events.TagsRemoved{
|
||||
Tags: toDelete,
|
||||
Tags: strings.Join(unassignment.Tags, ","),
|
||||
Ref: &provider.Reference{
|
||||
ResourceId: &rid,
|
||||
Path: ".",
|
||||
|
||||
@@ -29,7 +29,7 @@ func (b Basic) Extract(_ context.Context, ri *storageProvider.ResourceInfo) (Doc
|
||||
|
||||
if m := ri.ArbitraryMetadata.GetMetadata(); m != nil {
|
||||
if t, ok := m["tags"]; ok {
|
||||
doc.Tags = tags.FromList(t).AsSlice()
|
||||
doc.Tags = tags.New(t).AsSlice()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,10 +190,7 @@ func matchToPropResponse(ctx context.Context, match *searchmsg.Match) (*propfind
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("d:getcontenttype", match.Entity.MimeType))
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:permissions", match.Entity.Permissions))
|
||||
|
||||
t := tags.FromList("")
|
||||
for _, tag := range match.Entity.Tags {
|
||||
t.AddList(tag)
|
||||
}
|
||||
t := tags.New(match.Entity.Tags...)
|
||||
propstatOK.Prop = append(propstatOK.Prop, prop.Escaped("oc:tags", t.AsList()))
|
||||
|
||||
// those seem empty - bug?
|
||||
|
||||
Reference in New Issue
Block a user