Open ruanyl opened 7 months ago
@AMoo-Miki @seraphjiang @zengyan-amazon @ashwin-pc @Flyingliuhub @kavilla would be really nice to have your thoughts :)
I'm onboard with Option A you have provided. Or we can do option A but change it does be an object like:
id: object-id
workspaces: [{ id: workspace-a, permissions: inherited (default if not included) } , { id: workspace-b; permissions: none } ]
But that might be too much extra work. So that said option A makes a lot of sense to me on a technical level as well and makes it easier to see that it's only a reference internally.
Will raise up in triage tmrw for others opinions as well.
A third option could be:
{
id: <object-id>,
...
workspace: <owning-workspace-id>,
sharedWith: [<workspace-a>, <workspace-b>, ...]
}
workspace
is the ID of the new owning workspace and sharedWith
is empty.Pros
Cons
workspaces
into a string of workspace
.
- Users understand that anything shared with them is read-only and can be cloned to make changes to.
i think share both have read-only share and write share, with this we need a way to differentiate them.
i think share both have read-only share and write share, with this we need a way to differentiate them.
With option 3, we simplify that. No shared object is writable; they are all read-only. While it is nice to provide users with as many options as we can, too many options can distract and confuse users. A simple definition where a shared object is read-only, yet clone-able, would be easier for the users to understand and use.
Summary
This RFC proposes a design for sharing saved objects across workspaces in order to enable efficient sharing and collaboration between users across different workspaces. This RFC is created with taking object permission control(ACL) into consideration, but it should also applicable when ACL is disabled.
Background
Current design
When a saved object is initially created within a workspace, the saved object stores the workspace id in workspaces field, and the permission to this saved object inherits, means the user with permission on workspace-a will have the same permission on the saved object.
When the object is shared into another workspace, the target workspace is added to the
workspaces
list. The permission of the saved object inherits that of the target workspace upon sharing. For example, if an user has write permission to workspace-b, the user will have write permission to the shared saved object as well:Limitations
Proposed design
Option A
Instead of adding directly to the workspaces array, we will give it a prefix to differentiate it from the original workspace, such as:
With this design, the permission of the object will no longer inherit from the workspace where the object was “shared” to, in other words, we can say the object is referenced in workspace-b, but only the original workspace defines the permission to this object.
Pros
Cons
REF/<workspace-id>
Option B
Refactor the current permission model to include workspace-specific
permissions
within the permissions field.Pros
Cons
workspace
related fields which may be confusing:This RFC is based on the discussion with @SuZhou-Joe @Hailong-am @xluo-aws @yubonluo