nextcloud / nextcloud/server

Disable move function on shared folder, if target is out of scope of shared root folder

Open
#40,881 17 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: sharing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

Example usecase:

  • You have a shared folder [Team 1] for 5 people,
    and everybody should be able to edit/rename/update/delete on all files in this share.
    The share further is not syncable (protected by hidden-Tag and "file access control")

  • Then u have a further shared folder [Team 2] for 3 people,
    and also everybody should be able to edit/rename/update/delete on all files in this share.
    The share further is not syncable (protected by hidden-Tag and "file access control")

  • Further all 8 people also have their own folders in user space (unlimted)

Then u got a problem with the "moveFileFunction", as everbybody is able to move files from shared folder to his own root folder (in user space) or to a subfolder (in user space). Then further from his user space, he can do everything, also sync!, what is in upper usecase not allowed.

Actually i found no way to protect it, also tried things like "File access control" and "Group folders".

Describe the solution you'd like

  • A user and shared permission based solution, which allow either move operation out of shared-root scope or forbid it.

Describe alternatives you've considered

  • For the moment i build a simple, alpha like, solution which just take care that the targetPath of the moveFileFunction call, is valid to the RootPath of the share. (it works with just one file to be edited)

Additional context
Here some examples:

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

The issue names no files, tests, or entry points. Start by tracing the server-side move operation and the permission checks for shared-folder roots, then identify how a target outside the share is handled; done means the requested move restriction is implemented with coverage for allowed moves within the share and rejected moves outside it.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authorization, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.