Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

404
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda