Skip to content

Permission of reshare cannot be increased #35528

Description

@phil-davis

Steps to reproduce

  1. user0 shares a folder TMP with user1 with permissions 23 (can-share+read-update-create)
  2. user1 shares TMP with user2 with permissions 17 (can-share+read)
  3. user1 tries to update the permissions of the share to 23

Expected behaviour

Step 3 works, and the share now has permissions 23

Actual behaviour

Step 3 returns a 404

Server configuration

Operating system:
Ubuntu 18.04

Web server:
drone CI Apache

Database:
MySQL

PHP version:
7.*

ownCloud version: (see ownCloud admin page)
current master from git

A Gherkin acceptance test scenario that demonstrates the issue:

  Scenario Outline: Update of reshare can increase permissions to the maximum allowed
    Given using OCS API version "<ocs_api_version>"
    And user "user2" has been created with default attributes and without skeleton files
    And user "user0" has created folder "/TMP"
    And user "user0" has created a share with settings
      | path        | /TMP  |
      | shareType   | 0     |
      | shareWith   | user1 |
      | permissions | 23    |
    And user "user1" has created a share with settings
      | path        | /TMP  |
      | shareType   | 0     |
      | shareWith   | user2 |
      | permissions | 17    |
    When user "user1" updates the last share using the sharing API with
      | permissions | 23 |
    Then the OCS status code should be "404"
    And the HTTP status code should be "<http_status_code>"
    #Then the OCS status code should be "<ocs_status_code>"
    #And the HTTP status code should be "200"
    Examples:
      | ocs_api_version | http_status_code |
      | 1               | 200              |
      | 2               | 404              |
      #| ocs_api_version | ocs_status_code |
      #| 1               | 100             |
      #| 2               | 200             |

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions