Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple workspaces with the same workspace name #230

Open
tdari opened this issue Feb 5, 2024 · 3 comments
Open

Multiple workspaces with the same workspace name #230

tdari opened this issue Feb 5, 2024 · 3 comments

Comments

@tdari
Copy link
Contributor

tdari commented Feb 5, 2024

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.

@vinicvaz
Copy link
Collaborator

vinicvaz commented Feb 5, 2024

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

@tdari
Copy link
Contributor Author

tdari commented Feb 6, 2024

@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?

@vinicvaz
Copy link
Collaborator

vinicvaz commented Feb 6, 2024

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: #229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants