Skip to content

Commit

Permalink
remove 2 expected failures
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Dec 7, 2021
1 parent 42e238c commit e7bee4a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
3 changes: 2 additions & 1 deletion changelog/unreleased/handle-public-link-permissions-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Bugfix: handle sending all permissions when creating public links

For backwards compatability we now reduce permissions to readonly when a create public link carries all permissions.

https://github.com/cs3org/reva/issues/2336
https://github.com/cs3org/reva/issues/2336
https://github.com/owncloud/ocis/issues/1269
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,17 @@ func (h *Handler) removePublicShare(w http.ResponseWriter, r *http.Request, shar
response.WriteOCSSuccess(w, r, nil)
}

// for public links oc10 api decreases all permissions to read: stay compatible!
func decreasePermissionsIfNecessary(perm int) int {
if perm == int(conversions.PermissionAll) {
perm = int(conversions.PermissionRead)
}
return perm
}

func ocPublicPermToCs3(permKey int, h *Handler) (*provider.ResourcePermissions, error) {

if permKey == 31 {
// apiSharePublicLink1/createPublicLinkShare.feature:109
// Scenario Outline: Trying to create a new public link share of a file with edit permissions only grants read access using the public WebDAV API
permKey = 1
}
permKey = decreasePermissionsIfNecessary(permKey)

// TODO refactor this ocPublicPermToRole[permKey] check into a conversions.NewPublicSharePermissions?
// not all permissions are possible for public shares
Expand Down
5 changes: 0 additions & 5 deletions tests/acceptance/expected-failures-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,6 @@ The first two tests work against ocis. There must be something wrong in the CI s
- [apiSharePublicLink1/changingPublicLinkShare.feature:51](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/changingPublicLinkShare.feature#L51)
- [apiSharePublicLink1/changingPublicLinkShare.feature:90](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/changingPublicLinkShare.feature#L90)

#### [Public link enforce permissions](https://github.com/owncloud/ocis/issues/1269)

- [apiSharePublicLink1/createPublicLinkShare.feature:141](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L141)
- [apiSharePublicLink1/createPublicLinkShare.feature:142](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L142)

#### [various sharing settings cannot be set](https://github.com/owncloud/ocis/issues/1328)

- [apiSharePublicLink1/createPublicLinkShare.feature:319](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L319)
Expand Down
5 changes: 0 additions & 5 deletions tests/acceptance/expected-failures-on-S3NG-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,6 @@ File and sync features in a shared scenario
- [apiSharePublicLink1/changingPublicLinkShare.feature:51](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/changingPublicLinkShare.feature#L51)
- [apiSharePublicLink1/changingPublicLinkShare.feature:90](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/changingPublicLinkShare.feature#L90)

#### [Public link enforce permissions](https://github.com/owncloud/ocis/issues/1269)

- [apiSharePublicLink1/createPublicLinkShare.feature:141](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L141)
- [apiSharePublicLink1/createPublicLinkShare.feature:142](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L142)

#### [various sharing settings cannot be set](https://github.com/owncloud/ocis/issues/1328)

- [apiSharePublicLink1/createPublicLinkShare.feature:319](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiSharePublicLink1/createPublicLinkShare.feature#L319)
Expand Down

0 comments on commit e7bee4a

Please sign in to comment.