Comments (10)
Welcome to open PRs!
I think it is a good idea and the HttpRequest object can be added to the ICasbinAuthorizationContext without a lot of changes
It may a better way of replacing the User property with HttpConext in ICasbinAuthorizationContext.
from casbin-aspnetcore.
Ok.
In my proof of concept I added HttpRequest to the ICasbinAuthorizationData, but perhaps a better place is to add it to ICasbinAuthorizationContext?
I will look into it
from casbin-aspnetcore.
@sagilio plz make a new release.
from casbin-aspnetcore.
Is there anything you need from me which is blocking a new release?
Is there CI/CD (bleeding edge) pipeline where I can get the latest merged changes?
The reason for asking is to avoid having to set up my own nuget package pipeline to get the latest changes into my project.
from casbin-aspnetcore.
@thoraj You can refer this:https://github.com/casbin-net/casbin-aspnetcore#installation,
and now the latest build version will be auto push to here : https://www.myget.org/feed/casbin-net/package/nuget/Casbin.AspNetCore.
Recently we will release alpha versions on nuget.org, you can get the new version directly at that time.
from casbin-aspnetcore.
@sagilio we should setup semantic-release to push every merged PR into nuget directly. That's fine because we use semantic-versioning to make sure the users can always know what they are doing, does this make sense?
from casbin-aspnetcore.
Ok.
I am consuming the Casbin packages from the myget feed. The latest versions there are:
- Casbin.AspNetCore:
0.1.0-build.16.master.64cc1dc
(from March 10, 2021) - Casbin.AspNetCore.Core:
0.1.0-build.71.master.51c2fd0
(from October 2, 2020) - Casbin.AspNetCore.Abstractions:
0.1.0-build.71.master.51c2fd0
(from October 2, 2020)
So until a new release of Casbin.AspNetCore.Abstractions is available the HttpRequest will be missing on the ICasbinAuthorizationContext
interface
from casbin-aspnetcore.
@hsluoyz Yes, I am doing it.
from casbin-aspnetcore.
@thoraj
All package last version should be 0.1.0-build.16.master.64cc1dc
, I have unlisted the old version, you can check it now.
And now the HttpConext
is available to the CasbinAuthorizationContext
, You can get the request in it. Because I think user may need the Connection
and more properties not only User
and HttpReuqest
. The changes in this commit : 2fe5e4f
from casbin-aspnetcore.
Yes fine. Looks good. My reason for not adding the HttpContext was that it is available on the HttpRequest object. But it is probably cleaner to replace both User and HttpRequest with HttpContext.
I just updated the packages from the myget feed, so all is good.
from casbin-aspnetcore.
Related Issues (20)
- Update to Casbin.NET v2.0.0-preview.1 HOT 1
- Add casbin logo to nuget packages
- Fix GitHub Actions error HOT 2
- How can I make CasbinAuthorize work with a specific request transformer HOT 3
- Enforcer lifecycle, caching etc. HOT 4
- [Question] How to retrieve NetCasbin.Enforcer from ApiController? HOT 9
- how to use EFCore-Adapter together with casbin-aspnetcore HOT 3
- How to pass a custom EnforcerService or how to make dbcontext available to RequestTransformer HOT 5
- Does [CasbinAuthorize] work in Razor Pages? HOT 3
- Missing compatibility with Casbin EFCore Adapter HOT 8
- Support for imperative authorization checks HOT 6
- CodeQL CI failed HOT 3
- Fix CI error of codeql anaylzer HOT 4
- Another CodeQL CI error HOT 1
- Best way to use EF core adapter with filter HOT 3
- Using query or route params in CasbinAuthorizeAttribute HOT 1
- CI error: error CS0103: The name 'SyncedEnforcer' does not exist in the current context HOT 5
- The options.DefaultRequestTransformerType was not found HOT 12
- [bug] the commit "fix: not use ref values to transform" failed the CI tests HOT 6
- Ef core example - WebApplicationWithEfcoreSample HOT 4
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 casbin-aspnetcore.