Multiple roles for single User

Hello,
I have a unique issue that I can’t seem to find any answer for.

How do I assign a user multiple roles in the database?
I’m not referring to the Option Sets where the field type is set to a list.
I have three user roles - Admin, Editor, and Viewer

Let’s say a user (John) creates a folder named “Red Folder”. John is the admin role of “Red Folder”.
Elsewhere, another user (Jane) creates a folder named “Blue Folder” of which Jane is the admin of “Blue Folder”.

Then John invites Jane to view and edit items in their “Red Folder”. Jane is an Admin of “Blue Folder” and now separately an Editor of “Red Folder”.

John also invites another user (Ruth) to be only a Viewer role of “Red Folder”.

In summary,

  • John (user) has a role of Admin for data type “Red Folder”.
  • Jane (user) has a role of Admin for data type “Blue Folder”.
  • Jane also has a role of Editor for data type “Red Folder”.
  • Ruth (user) has a role of Admin for any future folders she wants to create. But currently is just a Viewer role for data type “Red Folder”.

A good real-life example of what I mean is how “google drive” works with shared folders.

Hope that makes sense and someone smarter than me has a solution.
Thank You!

you can add an [editors] list property of type user to the folder datatype. When an admin invites another user, they are added to the list of editors. And when viewing/editing a folder, add conditions on view/hide and workflows to control what each role can see/do.