Skip to content

Bug: Unable to add roles to users #18

@wz2k

Description

@wz2k

Steps to reproduce

  1. As an administrator navigate to the manage users page
  2. For any user in the table, click on the plus icon to under roles
    image
  3. Fill in role information and attempt to add the role

Error description

The following notification will be shown when attempting to add a role:
image
The cause of this is a 404 not found error for the endpoint.


Possible fix

There is a /api/users/:variable endpoint for adding multiple roles when variable = one of the role names. The endpoint also adds a role to a single user if variable is a user ID. Currently, the frontend for adding roles tries to send data to the /api/users/:userId/:role endpoint, which does not match. Removing /:role would match the endpoint, but changes need to be made to the request body being sent for it to work.

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