hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
182 stars 105 forks source link

[FEAT] Fetch all Users of an Organisation API - BACKEND #79

Closed scottandee closed 2 weeks ago

scottandee commented 1 month ago

Description

Develop API endpoint to fetch the list of all the users in a single organization

Acceptance Criteria

Request

GET /api/v1/organization/:orgId/users

Expected Outcome

Purpose

Provides a backend service which allows users to fetch all users in their organization

Requirements

Unittests:

  1. Successful users retrieval with a valid token and User ID.
  2. Test for unauthorized access without a valid token.
  3. Test for forbidden access when the user lacks appropriate permissions.
  4. Perform security testing to ensure data protection and compliance.
markessien commented 1 month ago

Superadmin does not retrieve in a different way

Armolas commented 1 month ago

Team Members slack IDs: @Dayo A @Omozua Judah

markessien commented 1 month ago

This appears duplicated

Armolas commented 1 month ago

This retrieves all the users of a single organisation while that retrieves all the organisation of a single user

markessien commented 1 month ago

this appears duplicated still, but we will find out when the PR enters