Skip to content

[Bug]: Project admin cannot delete project from project list page #3417

@jvstme

Description

@jvstme

Steps to reproduce

  1. Create a user that is not a global admin.
  2. Log in as that user.
  3. Create a project owned by that user.
  4. Navigate to the projects list page.
  5. Select that project.

Actual behaviour

The "Delete" button is inactive.

Image

Expected behaviour

The "Delete" button is active and can be used to delete the project.

dstack version

0.20.0

Server logs

Additional information

The UI attempts to perform client-side permission checks, but cannot do so correctly because /api/projects/list returns an empty member list for each project.

Possible solutions:

  • Update /api/projects/list to return project members. However, this will increase the response size, which is already large on some installations, such as Sky. May require adding pagination.
  • Drop client-side permission checks on the projects list page. Make the "Delete" button unconditionally active and rely on server-side permission checks.
  • Hide the "Delete" button for all users except global admins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions