Core: New share link forgets "Allow editing" permissions

Created on 1 Jun 2017  路  5Comments  路  Source: owncloud/core

screenflow

Steps to reproduce

  1. create a share link with edit permission, password and expiration date
  2. open the new link again, and it has lost his edit permission
  3. set edit permission again, then it's permanent

Expected behaviour

"Allow editing" permissions should be permanent for new created share link

Actual behaviour

New share link forgets "Allow editing" permissions

Server configuration

Operating system:
Ubuntu 16.04

Web server:
Apache

Database:
MySQL

PHP version:
7

ownCloud version: (see ownCloud admin page)
10.0.2

Updated from an older ownCloud or fresh install:
fresh install

Client configuration

Browser:
Chrome 58

Operating system:
macOS 10.12.5 (Sierra)

Bug sharing sev3-medium statuSTALE

All 5 comments

No password and expiration date in step 1 needed to reproduce.

curl 'https://<server>/ocs/v2.php/apps/files_sharing/api/v1/shares?format=json' 
 -H 'Content-Type: application/json' 
 -H 'OCS-APIREQUEST: true' 
 -H 'Content-Length: 76' 
[...]

With the following params:

{
   "expireDate":"",
   "permissions":15,
   "name":"3 link",
   "shareType":3,
   "path":"/3"
}

... is replied:

{
   "ocs":{
      "meta":{
         "status":"ok",
         "statuscode":200,
         "message":null
      },
      "data":{
         "id":"9",
         "share_type":3,
         "uid_owner":"admin",
         "displayname_owner":"admin",
         "permissions":1,
         [...]

Note the "permissions":1

Desktop client is not affected since it uses single PUT's to modify individual link properties. Only name is set on initial POSTrequest.

Indeed, was able to reproduce this with only the permissions.

Seems to be a server side API issue.

Tested the PR fix w/ different permission combinations and all requests were coherent with the response 馃憤

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings