Skip to content

bug: the username "roles" and "me" conflicts with routes #19389

@deansheather

Description

@deansheather

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If you create a user named roles and try to view their workspace as admin, you get a 404 because roles is considered part of GET /user/roles.

Image

Relevant Log Output

Expected Behavior

The following usernames should be prohibited:

  • me (conflicts with GET /users/me)
  • roles (conflicts with GET /users/roles)
  • authmethods
  • first

There are likely more. We should stop putting endpoints under routes with ID/name wildcard parameters.

Steps to Reproduce

  1. Create a user with a bad username
  2. Create a workspace for that user
  3. The workspace will fail to load in the UI when viewing the new user's workspace as an admin

Environment

No response

Additional Context

The issue occurs consistently

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue that require triage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions