GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Bring back "own uploads only" scope for staff/uploader roles · Issue #1644 · projectsend/projectsend

Bring back "own uploads only" scope for staff/uploader roles #1644

New issue
Copy link
New issue
Copy link
Open
Open
Bring back "own uploads only" scope for staff/uploader roles#1644
Copy link
Labels
Enhancement

Description

@mueller7382
mueller7382
opened on Aug 18, 2026
Issue body actions

Description

In ProjectSend v1, the Uploader role was useful for internal staff members who should be able to upload and manage files without being able to see files uploaded by other staff members.

After migrating to ProjectSend v2.0, the legacy Uploader role appears to be unscoped. As a result, users with this role can see the complete shared file library, even when permissions such as "Edit other users' files" and "Delete other users' files" are disabled.

The new Client Manager role partially provides the old behavior because it is client-scoped. However, its scope is designed around assigned clients:

  • own uploads
  • plus files/folders visible to assigned clients

This is not the same use case as an internal uploader.

Use case

We have many internal employees who use ProjectSend to exchange files with external clients.

A normal employee should:

  • upload files
  • see their own uploaded files
  • edit/delete their own files
  • assign their files to clients
  • create/use their own folders

But they should not be able to browse files uploaded by other employees.

Administrators or account managers should still be able to see the complete library.

There should be no requirement to assign clients to an employee just to restrict the employee's library visibility.

Current behavior

The legacy Uploader role is not client-scoped.

StaffLibraryScope::files() currently returns the complete file query for every staff user that is not client-scoped:

if (! $user->isClientScoped()) {
    return $query;
}

Activity

  1. denkfabrik-li commented on Aug 25, 2026

    @denkfabrik-li
    denkfabrik-li
    on Aug 25, 2026
    Contributor
    More actions

    For what it's worth, having just read through this part of the v2 code: the current behaviour looks intentional rather than accidental. Uploader is kept only as a legacy role — the SystemRole docblock spells it out: "an unscoped file-only staffer doesn't fit the v2 model, where limited staff are client-scoped (Client Manager)", and it's not seeded on fresh installs, only recreated by the v1→v2 migration as "Uploader (Legacy)". So v2 deliberately swapped the scoping axis: v1 scoped a limited staffer to their own uploads, v2 scopes them to their assigned clients (role.client_scoped).

    That said, the underlying need seems reasonable, and v2 gets close already — just not all the way:

    • A client_scoped role (Client Manager, or a custom one) with no assigned clients already collapses StaffLibraryScope::files() to where('uploaded_by', self) — i.e. it sees only its own uploads.
    • The catch is that the same assignedClients list also drives who they may share with (assignableClientIds() returns [] with no clients assigned), so such a user can't hand a file to anyone.

    So the real gap is that v2 fused two things v1 kept separate: what a staffer can see and whom they may share with. "Own uploads only, but still assign to clients" needs those two decoupled again.

    A shape that would fit the v2 model

    If you're open to restoring this, the cleanest fit I can see is to turn the role's client_scoped boolean into a small library-scope with three modes — roughly:

    • all — the whole shared library (today's unscoped staff)
    • assigned_clients — own uploads + the assigned clients' content (today's client_scoped)
    • own_uploads — own uploads only (the returning v1 Uploader behaviour)

    The nice part is that v2 already centralises this: StaffLibraryScope is the single point that decides visibility, and FilePolicy/FolderPolicy just delegate to its allowsFile()/allowsFolder(), so the file/folder side is one place to add the third mode. Comment visibility follows automatically — VisibleCommentScope and the moderation guards already delegate to the same StaffLibraryScope — so the only sibling that needs its own answer is the activity-log scope, which has an isClientScoped branch of its own (almost certainly: own entries only). A couple of small, well-bounded spots rather than a rewrite.

    Existing installs map straight onto the enum (client_scoped = true → assigned_clients, false → all), so nothing changes for current roles. And if you'd like v1 imports to get their old behaviour back without anyone editing a role, the migration tool could map "Uploader (Legacy)" onto own_uploads — that is exactly the semantics those users had in v1. Since that tightens what already-migrated legacy uploaders see on existing v2 installs, it probably deserves a release note rather than happening silently; keeping them on all and letting admins opt in per role is the conservative alternative.

    The one call that's yours to make

    For an own_uploads staffer, who may they share with — the full client roster (what v1's Uploader did, but it does expose every client's name in their assign dropdown), or a configured subset kept separate from what they can see? That's a policy choice about how much a low-privilege uploader should be shown, not a technical constraint, so I'd rather leave the direction to you.

    If you like this shape, I'm happy to put together a PR (scope enum + the StaffLibraryScope/audit/comment branches + the Roles UI selector + migration). And if you'd rather keep Uploader strictly legacy and not add a new mode, that's a perfectly reasonable answer too — just wanted to lay out that it's very doable within the current architecture.

  2. mueller7382 commented on Aug 26, 2026

    @mueller7382
    mueller7382
    on Aug 26, 2026
    Author
    More actions

    Thank you for the detailed analysis. Your description of the gap is exactly correct.

    For our use case, an own_uploads staff member should be able to share files with the full client roster, matching the behaviour of the v1 Uploader role.

    The intended behaviour is:

    • Staff members can only see and manage files and folders they uploaded themselves.
    • They cannot browse files uploaded by other staff members or existing files belonging to clients.
    • They can assign their own files to any client.
    • No clients need to be assigned to the staff member beforehand.
    • Assigning a file to a client must not expand the staff member's library visibility.

    This separation is also important for access control within our company. Some areas contain confidential information that regular employees should not necessarily be able to access. In addition, employees may not be authorised to view files from certain projects, departments, or clients.

    Therefore, disabling permissions such as editing or deleting other users' files is not sufficient. Even read-only visibility can already expose information that an employee is not authorised to access.

    In our case, exposing the client names in the assignment dropdown is acceptable. The important distinction is that knowing and selecting a client must not grant access to that client's existing files or folders.

    Therefore, visibility and sharing should be independent:

    • Library scope: own_uploads
    • Assignable clients: all clients

    The proposed three-mode scope (all, assigned_clients, and own_uploads) sounds like a clean solution and fits our original request very well.

    For existing v2 installations, keeping the current scope and allowing administrators to opt into own_uploads is probably the safest migration path. Newly migrated v1 Uploader (Legacy) roles could be mapped directly to own_uploads, since that matches their original v1 behaviour.

    We would be very happy to see a PR for this. Thank you for offering to implement it.

  3. ignacionelson commented on Sep 18, 2026

    @ignacionelson
    ignacionelson
    on Sep 18, 2026
    Collaborator
    More actions

    Thank you for your report! We are going to add an "own uploads only" scope for staff roles — planned for one of the next releases.

  4. ignacionelson
    added
    Enhancement
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.