hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
182 stars 105 forks source link

[FEAT] API Endpoint to Fetch All Roles within an Organisation. #288

Closed Adebimpe12 closed 2 weeks ago

Adebimpe12 commented 1 month ago

Description

Develop and integrate an API endpoint to facilitate the fetching of roles within an organization

Acceptance Criteria

Scope

Specific Requirements:

  1. Implement GET /api/v1/organisations/roles endpoint
  2. Use OrganizationGuard to extract and validate organization context
  3. Ensure authentication using JWT tokens
  4. Authorize users based on their permissions within the organization

Success Response (200 OK)

{
  "status_code": 200, 
  "data": [
    { "id": "string", "name": "string", "description": "string" },
  ]
}

TASKS

highb33kay commented 1 month ago

In the update and fetch roles ticket, we have a description, don't we?

Adebimpe12 commented 1 month ago

@highb33kay DEscription updated

highb33kay commented 1 month ago

Have you checked for duplicate?

Adebimpe12 commented 1 month ago

@highb33kay Changed, thanks Chairman

nedssoft commented 1 month ago

I'm not exactly sure why this ticket is useful, what inspired this ticket?

Adebimpe12 commented 1 month ago

Endpoint to retrieve roles Endpoint to create permissions Endpoint to retrieve permissions Endpoint to update user's role from implementing users roles and permissions

Adebimpe12 commented 1 month ago

@nedssoft This one https://github.com/hngprojects/hng_boilerplate_nestjs/issues/259