mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-03 03:18:36 -06:00
[full-ci] fix public link update (#7862)
* the tests were modified * Update tests/acceptance/features/coreApiSharePublicLink1/changingPublicLinkShare.feature Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com> * the expected failures removed * change log added, reva bumped. --------- Co-authored-by: Roman Perekhod <rperekhod@owncloud.com> Co-authored-by: Sawjan Gurung <saw.jan.grg3e@gmail.com>
This commit is contained in:
@@ -419,9 +419,15 @@ func (h *Handler) updatePublicShare(w http.ResponseWriter, r *http.Request, shar
|
||||
}
|
||||
|
||||
// empty permissions mean internal link here - NOT denial. Hence we need an extra check
|
||||
if !sufficientPermissions(statRes.GetInfo().GetPermissionSet(), newPermissions, true) {
|
||||
response.WriteOCSError(w, r, http.StatusForbidden, "no share permission", nil)
|
||||
return
|
||||
if newPermissions != nil {
|
||||
if !sufficientPermissions(statRes.GetInfo().GetPermissionSet(), newPermissions, true) {
|
||||
response.WriteOCSError(w, r, http.StatusForbidden, "no share permission", nil)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
statRes.GetInfo().GetPermissionSet()
|
||||
p := decreasePermissionsIfNecessary(int(conversions.RoleFromResourcePermissions(statRes.GetInfo().GetPermissionSet(), false).OCSPermissions()))
|
||||
permKey = &p
|
||||
}
|
||||
|
||||
// ExpireDate
|
||||
|
||||
Reference in New Issue
Block a user