Skip to content

Add integration test for listing role assignments for particular user #513

@gtema

Description

@gtema

The API test for trying to rescope into one of the projects it has access to caught few issues:

  • listing role assignments by only a user was mixing up roles assigned to system and project due to the use of HashMap by role_id (it is absolutely normal to have multiple assignments for the same role on different targets)
  • corrupted list was returned in the /auth/projects from the api and internal filter (that only lets GroupProject, UserProject assignments) resulted in the empty list
  • empty list went into the list of the projects returning all projects
  • auth into the scope that the user does not have roles on returns 500

Some of those errors should have been caught already on the integration test:

  • assign a user the same role on different projects (including system)
    • list role assignments passing only actor_id
    • list role assignments passing only role_id

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions