domino icon indicating copy to clipboard operation
domino copied to clipboard

Multiple workspaces with the same workspace name

Open tdari opened this issue 1 year ago • 3 comments

Currently, it is not possible to create multiple workspaces with the same name. But through invitation, a user can be in multiple workspaces with the same name. I think it is something that we don't want to happen.

image

I propose to update the user model to have a field called user_name which derives from the user's email field. When the user creates a new workspace we add user_name to the beginning of the workspace name. Therefore, a user can no longer have multiple workspaces with the same name because all workspaces are prefixed with the workspace's owner's name. In fact, it is what cloud-based Git repository providers are using.

We can also update the UI to look like this or we can keep the current design and just save with the prefix:

image

Here is what it will look like after the change,

image

We also need to update the default workspace creation configuration accordingly.

tdari avatar Feb 05 '24 18:02 tdari

Indeed this is a bug in workspaces list page. Your idea is good, but not sure about the user_name column in the users database, at the first time looks like an overkill/data duplication for a small problem. Of course, at some point we may want have usernames but I don't think we really need this now. Probably we will incorporate this in the future when we have the profile page with all its features.

We have been thinking about the current allowed permissions for a workspace and currently we have owner and read permissions only, where a user can be owner even without effectively creating that workspace. Maybe this is a good opportunity to refactor this permissions and how they work. We can do something like:

  1. Owner: Only for the creator of the workspace. This user can do everything in a workspace, from inviting users to delete workspace and all its contents.
  2. Write or Maintainer: The same access of the owner, except that this user **can't ** delete the workspace.
  3. Read: The current read access, can't invite, can't edit new things but can use for building workflows (not sure but I think this is the permission we have now)

With that we can them add to the cards a new field, like Ownership or other reference to the user owner, can be the user email. It can be as a subtitle, below the title. I think it will be cleaner and more explicit than having just username - workspace. We can even add filters to this page to show only workspaces where we have X permission, or belongs to user Y, this would be great!

What you think about that? @tdari

@luiztauffer @nathan-vm FYI

vinicvaz avatar Feb 05 '24 20:02 vinicvaz

@vinicvaz Yes permissions can be updated as well like you said. Email can be used instead of a username as you said but I could not imagine how it would look like on the UI. I think this workspace update needs to be devised carefully maybe it is better to fix current obvious bugs first what do you think?

tdari avatar Feb 06 '24 16:02 tdari

Agree with you, I'm planning to look again to the database design this week and I will think about workspaces permissions.

About other bugs, I found one yesterday you can look if you have availability, is this one: https://github.com/Tauffer-Consulting/domino/issues/229

vinicvaz avatar Feb 06 '24 16:02 vinicvaz