owncloud / owncloud/core

Legacy public link permission 7

Open
#37,635 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type:Bug
Dominant language
PHP
Stars
8.8k
Forks
2.1k
Avg merge
20h 7m
Merged PRs (30d)
41

Description

There's an acceptance tests that updates public links with permission=7: https://github.com/owncloud/core/blob/v10.4.0/tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature#L161

Reading the code it seems this is only allowed when updating shares: https://github.com/owncloud/core/blob/v10.4.0/apps/files_sharing/lib/Controller/Share20OcsController.php#L790

For creating shares this combination does not exist: https://github.com/owncloud/core/blob/v10.4.0/apps/files_sharing/lib/Controller/Share20OcsController.php#L472

If permissions=7 is legacy then we might want to prevent it. Or make it consistent for creation.

For now in https://github.com/owncloud/core/pull/37633 I've modified the test to use the non-legacy value to align with OCIS as we don't want to have this legacy permission there.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read tests/acceptance/features/apiSharePublicLink2/updatePublicLinkShare.feature around line 161 and compare the create and update paths in apps/files_sharing/lib/Controller/Share20OcsController.php around lines 472 and 790. Inspect pull request 37633 for the current test adjustment. Done means the legacy permission behavior is resolved consistently and covered by the acceptance tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.