Comments (5)
What is the use case for that?
Isn't it enough getting the user from the request object?
from dataui-nestjs-crud.
Sorry i think my issue is not very clear, i think there is 2 linkeds subjects :
- Subject 1. Nestjs-crud ask to Map "auth.property". it's pity to dont use this informations for hydrate auth informations on CrudRequest.
- Exemple of use case :
- check some additional sécurité rules of AuthGuard directory on services.
- add author informations on log on services
- use this object to add some custom business rules (it's my principal let's motivation, i often add some business instructions on CrudRequest.option according to user'auth informations, as role for exemple)
- Prevent/simplify nestjs pattern that remove singleton pattern on service
This feature give a usefulll "helper" for développer.
- Subject 2 (linked with subject 1) : If i dont do a mistake all attributs on CrudRequest object is interpreted by nestjs-crud. That feature can be obvious if we need to pass some custom/business param for exemple (throw exception because this custom param is not know on entity ..). Exemple of use case (stupide case 😁 there is a lot of use case more interresting ) :
- If i want to get my entity A and add some custom attribut on entity for count the number of relationship B, it's usefulll to add "extra.b.count" on request and do my custom request directly on service.
This feature give more flexibility on request process.
from dataui-nestjs-crud.
I see, it makes sense yes.
If you are willing to make a PR I will review and merge it. Else we might introduce when we need it, right now we have no immediate need for this functionality but I can see it ( especially the extra parameters) being very useful.
from dataui-nestjs-crud.
Hi, the PR is here for your code review #13
thx.
from dataui-nestjs-crud.
Feature is implemented on v5.2.3
https://github.com/gid-oss/dataui-nestjs-crud/tree/v5.2.3
from dataui-nestjs-crud.
Related Issues (20)
- Bug: GetMany with join + pagination throws duplicate column error HOT 1
- empty schema for the Entity HOT 8
- cannot set decorators globally
- transform the body without interceptors HOT 4
- Feature Request: Join Filter (ON clause) HOT 2
- Minor typo in main.yml: Docker Compose command HOT 1
- @Crud dynamic params and ManyToOne Relationships incorrect column mapping
- wrong typing HOT 2
- include soft deleted rows HOT 1
- extend CrudController HOT 2
- Tips: How to add customized filter conditions from backend service. HOT 2
- How to specify `operationId` for each route? HOT 1
- [help] how to add additional methods without overriding HOT 1
- Join Condition (on clause) not working as given in the docs HOT 2
- Support for GroupBy clause and Aggregate functions
- wrong Reflect method HOT 5
- export helpers and expose crudSwagger decorator HOT 2
- Is it possible to cascade soft delete with this library?
- Error to GET with many joins
- Patch is not updating foreign reference 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 dataui-nestjs-crud.