Giter Club home page Giter Club logo

Comments (10)

sagilio avatar sagilio commented on May 27, 2024

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.

thoraj avatar thoraj commented on May 27, 2024

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.

hsluoyz avatar hsluoyz commented on May 27, 2024

@sagilio plz make a new release.

from casbin-aspnetcore.

thoraj avatar thoraj commented on May 27, 2024

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.

sagilio avatar sagilio commented on May 27, 2024

@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.

hsluoyz avatar hsluoyz commented on May 27, 2024

@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.

thoraj avatar thoraj commented on May 27, 2024

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.

sagilio avatar sagilio commented on May 27, 2024

@hsluoyz Yes, I am doing it.

from casbin-aspnetcore.

sagilio avatar sagilio commented on May 27, 2024

@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.

thoraj avatar thoraj commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.