Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

401
Views
How to implement RBAC permission in REST API (Nest.js Best Practice)

I am writing a REST API service where I need to add a layer of authorization for the endpoints I provide. I implemented authorization by using discrete permission on every controller using a guard/middleware.

  @Get('/clients')
  @hasPermissions('read', 'all')
  @UseGuards(PermissionsGuard)
  async getClient(@Query() query, @Res() res) { 
      ...
  }

My question is I need to add a layer of access depending on the owner of the resource. For example, if the user has an admin previllages he/she can see clients created by everyone, however, if the user has a privilege that is lower than the admin he/she can only see a client which created by himself/herself.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!