Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix response format of the sharees API #1954

Merged
merged 1 commit into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/fix-sharees-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: Fix response format of the sharees API

The sharees API wasn't returning the users and groups arrays correctly.

https://github.com/cs3org/reva/pull/1954
14 changes: 7 additions & 7 deletions internal/http/services/owncloud/ocs/conversions/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,21 @@ type ShareData struct {
// ShareeData holds share recipient search results
type ShareeData struct {
Exact *ExactMatchesData `json:"exact" xml:"exact"`
Users []*MatchData `json:"users" xml:"users"`
Groups []*MatchData `json:"groups" xml:"groups"`
Remotes []*MatchData `json:"remotes" xml:"remotes"`
Users []*MatchData `json:"users" xml:"users>element"`
Groups []*MatchData `json:"groups" xml:"groups>element"`
Remotes []*MatchData `json:"remotes" xml:"remotes>element"`
}

// ExactMatchesData hold exact matches
type ExactMatchesData struct {
Users []*MatchData `json:"users" xml:"users"`
Groups []*MatchData `json:"groups" xml:"groups"`
Remotes []*MatchData `json:"remotes" xml:"remotes"`
Users []*MatchData `json:"users" xml:"users>element"`
Groups []*MatchData `json:"groups" xml:"groups>element"`
Remotes []*MatchData `json:"remotes" xml:"remotes>element"`
}

// MatchData describes a single match
type MatchData struct {
Label string `json:"label" xml:"label"`
Label string `json:"label" xml:"label,omitempty"`
Value *MatchValueData `json:"value" xml:"value"`
}

Expand Down
38 changes: 12 additions & 26 deletions tests/acceptance/expected-failures-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,9 @@ File and sync features in a shared scenario
- [apiWebdavEtagPropagation1/moveFileFolder.feature:315](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavEtagPropagation1/moveFileFolder.feature#L315)

#### [Searching sharee with displayname](https://github.com/owncloud/ocis/issues/547)
- [apiSharees/sharees.feature:32](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L32)
- [apiSharees/sharees.feature:33](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L33)
- [apiSharees/sharees.feature:53](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L53)
- [apiSharees/sharees.feature:54](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L54)
These tests fail because they contain some configuration steps for oc10 specific configuration.
labkode marked this conversation as resolved.
Show resolved Hide resolved
- [apiSharees/sharees.feature:74](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L74)
- [apiSharees/sharees.feature:75](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L75)
- [apiSharees/sharees.feature:98](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L98)
- [apiSharees/sharees.feature:99](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L99)
- [apiSharees/sharees.feature:118](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L118)
- [apiSharees/sharees.feature:119](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L119)
- [apiSharees/sharees.feature:137](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L137)
Expand All @@ -365,42 +360,33 @@ File and sync features in a shared scenario
- [apiSharees/sharees.feature:298](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L298)
- [apiSharees/sharees.feature:317](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L317)
- [apiSharees/sharees.feature:318](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L318)
- [apiSharees/sharees.feature:336](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L336)
- [apiSharees/sharees.feature:337](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L337)
- [apiSharees/sharees.feature:355](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L355)
- [apiSharees/sharees.feature:356](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L356)
- [apiSharees/sharees.feature:374](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L374)
- [apiSharees/sharees.feature:375](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L375)
- [apiSharees/sharees.feature:393](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L393)
- [apiSharees/sharees.feature:394](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L394)
- [apiSharees/sharees.feature:412](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L412)
- [apiSharees/sharees.feature:413](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L413)
- [apiSharees/sharees.feature:430](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L430)
- [apiSharees/sharees.feature:431](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L431)
- [apiSharees/sharees.feature:450](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L450)
- [apiSharees/sharees.feature:451](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L451)
- [apiSharees/sharees.feature:475](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L475)
- [apiSharees/sharees.feature:476](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L476)
- [apiSharees/sharees.feature:495](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L495)
- [apiSharees/sharees.feature:496](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L496)
- [apiSharees/sharees.feature:515](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L515)
- [apiSharees/sharees.feature:516](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L516)
- [apiSharees/sharees.feature:537](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L537)
- [apiSharees/sharees.feature:538](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L538)
- [apiSharees/sharees.feature:560](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L560)
- [apiSharees/sharees.feature:561](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L561)
- [apiSharees/sharees.feature:586](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L586)
- [apiSharees/sharees.feature:587](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L587)
- [apiSharees/sharees.feature:607](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L607)
- [apiSharees/sharees.feature:608](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L608)
- [apiSharees/sharees.feature:632](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L632)
- [apiSharees/sharees.feature:633](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L633)
- [apiSharees/sharees.feature:657](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L657)
- [apiSharees/sharees.feature:658](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L658)
- [apiSharees/sharees.feature:682](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L682)
- [apiSharees/sharees.feature:683](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L683)
- [apiSharees/sharees.feature:702](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L702)
- [apiSharees/sharees.feature:703](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L703)
These tests fail because we currently can't differentiate between exact matches and not exact matches.
labkode marked this conversation as resolved.
Show resolved Hide resolved
- [apiSharees/sharees.feature:336](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L336)
- [apiSharees/sharees.feature:337](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L337)
- [apiSharees/sharees.feature:355](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L355)
- [apiSharees/sharees.feature:356](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L356)
- [apiSharees/sharees.feature:374](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L374)
- [apiSharees/sharees.feature:375](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L375)
- [apiSharees/sharees.feature:393](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L393)
- [apiSharees/sharees.feature:394](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L394)
- [apiSharees/sharees.feature:412](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L412)
- [apiSharees/sharees.feature:413](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L413)

#### User cannot create a folder named Share
- [apiShareManagementToShares/acceptShares.feature:291](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/acceptShares.feature#L291)
Expand Down
38 changes: 12 additions & 26 deletions tests/acceptance/expected-failures-on-S3NG-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,9 @@ File and sync features in a shared scenario
- [apiWebdavEtagPropagation1/moveFileFolder.feature:315](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiWebdavEtagPropagation1/moveFileFolder.feature#L315)

#### [Searching sharee with displayname](https://github.com/owncloud/ocis/issues/547)
- [apiSharees/sharees.feature:32](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L32)
- [apiSharees/sharees.feature:33](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L33)
- [apiSharees/sharees.feature:53](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L53)
- [apiSharees/sharees.feature:54](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L54)
These tests fail because they contain some configuration steps for oc10 specific configuration.
labkode marked this conversation as resolved.
Show resolved Hide resolved
- [apiSharees/sharees.feature:74](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L74)
- [apiSharees/sharees.feature:75](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L75)
- [apiSharees/sharees.feature:98](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L98)
- [apiSharees/sharees.feature:99](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L99)
- [apiSharees/sharees.feature:118](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L118)
- [apiSharees/sharees.feature:119](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L119)
- [apiSharees/sharees.feature:137](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L137)
Expand All @@ -371,42 +366,33 @@ File and sync features in a shared scenario
- [apiSharees/sharees.feature:298](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L298)
- [apiSharees/sharees.feature:317](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L317)
- [apiSharees/sharees.feature:318](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L318)
- [apiSharees/sharees.feature:336](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L336)
- [apiSharees/sharees.feature:337](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L337)
- [apiSharees/sharees.feature:355](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L355)
- [apiSharees/sharees.feature:356](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L356)
- [apiSharees/sharees.feature:374](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L374)
- [apiSharees/sharees.feature:375](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L375)
- [apiSharees/sharees.feature:393](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L393)
- [apiSharees/sharees.feature:394](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L394)
- [apiSharees/sharees.feature:412](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L412)
- [apiSharees/sharees.feature:413](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L413)
- [apiSharees/sharees.feature:430](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L430)
- [apiSharees/sharees.feature:431](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L431)
- [apiSharees/sharees.feature:450](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L450)
- [apiSharees/sharees.feature:451](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L451)
- [apiSharees/sharees.feature:475](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L475)
- [apiSharees/sharees.feature:476](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L476)
- [apiSharees/sharees.feature:495](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L495)
- [apiSharees/sharees.feature:496](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L496)
- [apiSharees/sharees.feature:515](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L515)
- [apiSharees/sharees.feature:516](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L516)
- [apiSharees/sharees.feature:537](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L537)
- [apiSharees/sharees.feature:538](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L538)
- [apiSharees/sharees.feature:560](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L560)
- [apiSharees/sharees.feature:561](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L561)
- [apiSharees/sharees.feature:586](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L586)
- [apiSharees/sharees.feature:587](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L587)
- [apiSharees/sharees.feature:607](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L607)
- [apiSharees/sharees.feature:608](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L608)
- [apiSharees/sharees.feature:632](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L632)
- [apiSharees/sharees.feature:633](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L633)
- [apiSharees/sharees.feature:657](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L657)
- [apiSharees/sharees.feature:658](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L658)
- [apiSharees/sharees.feature:682](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L682)
- [apiSharees/sharees.feature:683](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L683)
- [apiSharees/sharees.feature:702](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L702)
- [apiSharees/sharees.feature:703](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L703)
These tests fail because we currently can't differentiate between exact matches and not exact matches.
labkode marked this conversation as resolved.
Show resolved Hide resolved
- [apiSharees/sharees.feature:336](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L336)
- [apiSharees/sharees.feature:337](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L337)
- [apiSharees/sharees.feature:355](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L355)
- [apiSharees/sharees.feature:356](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L356)
- [apiSharees/sharees.feature:374](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L374)
- [apiSharees/sharees.feature:375](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L375)
- [apiSharees/sharees.feature:393](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L393)
- [apiSharees/sharees.feature:394](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L394)
- [apiSharees/sharees.feature:412](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L412)
- [apiSharees/sharees.feature:413](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharees/sharees.feature#L413)

#### User cannot create a folder named Share
- [apiShareManagementToShares/acceptShares.feature:291](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiShareManagementToShares/acceptShares.feature#L291)
Expand Down