Problem:
Currently, FileNode/query lacks filtering capabilities based on access control or sharing status. When users want to locate, audit, modify, or revoke permissions for files or directories shared with specific users (or simply find all shared items), they are forced to manually traverse the entire directory tree and inspect individual node objects. This causes significant performance and usability overhead, especially in large hierarchies.
Proposed Solution:
Extend FileNode/query filter criteria to support sharing-based parameters, aligning with the access control model defined in Section 5 (Access Control) of the JMAP FileNode spec.
We propose adding the following filter properties:
-
isShared: “Boolean”`- If
true, matches nodes that are explicitly shared with anyone (i.e., theshareWithaccess control list is non-empty / non-null). - If
false, matches unshared nodes.
- If
-
shareWith: “String[]”`- Matches nodes where the access control list explicitly includes any of the specified account IDs. This allows clients to query all items shared with a particular collaborator instantly without performing a full recursive tree walk.
Benefits:
- Efficient Access Auditing: Enables instant lookup of files and directories shared with specific users or overall shared assets.
- Streamlined Permission Management: Simplifies bulk updates, revoking permissions, or cleaning up obsolete shares.
- Reduced Client-Side Overhead: Eliminates the need for expensive recursive client-side tree traversals to discover sharing relationships.