Comments (2)
Para solucionar este inconveniente
Retorno en el payload el nombre del rol en un array, además este atributo debe estar con el nombre "roles", con esto se soluciona.
const payload: IPayload = {
.
.
.
roles: [user.rolEntity.nombreRol],
};
En el token obtengo
{
"nombre": "admin",
"nombreUsuario": "admin",
"email": "[email protected]",
"roles:" ["admin"]
}
from nest-access-control.
Grax men
from nest-access-control.
Related Issues (20)
- nestjs 10 support? HOT 2
- updates HOT 3
- Pass custom prop for roles HOT 5
- How fresh grants list when use forRootAsync read grants list from database and changed grants list in database HOT 1
- Support for Graphql HOT 4
- What if you want to change users roles/permissions HOT 1
- [Question] Simple RBAC system with route guard by user's role HOT 3
- UseRoles resource on BaseController that is extended by the resource controller HOT 1
- Unclear what the video - title attribute does in the example HOT 2
- New graphql dependency is a braking change HOT 2
- grant access for every resource ? HOT 1
- UserRoles decorator crash for public endpoints
- unnecessary peer deps
- improper version expression in peer dependency
- Have two roles ADMIN , USER . ADMIN can manipulate all the resources but the User can readAny and update only its own resources .How can I achieve this. HOT 2
- How can a user edit elements with common characteristics? HOT 1
- NAC has no effect, what i am doing wrong?
- ForRootAsync is not working HOT 1
- What if i have only one role for user? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nest-access-control.