Giter Club home page Giter Club logo

Comments (9)

sagilio avatar sagilio commented on May 28, 2024

Ok, but I don’t know enough about Blazor now, it may take some time.

from casbin-aspnetcore.

hsluoyz avatar hsluoyz commented on May 28, 2024

@LeiYangGH do you want to use C# Casbin in frontend? I think if you can import Casbin.NET lib in Blazor C# code, then you are free to use it. I don't know if there is anything blocking you? Or you can choose to use Node-Casbin (JS version) directly in frontend.

from casbin-aspnetcore.

LeiYangGH avatar LeiYangGH commented on May 28, 2024

I'd like to use C# Casbin in frontend.

The repo already has a sample syntax like [CasbinAuthorize(nameof(BasicTest), nameof(HttpMethod.Get))], which is designed for asp.net core controller, right?

But a Blazor app can have no controller, it can have only razor page. so for a newbie(like me), there's no way to use the CasbinAuthorize attribute, at least there's no obvious way.

So I'd like suggest a Blazor sample.

if you can import Casbin.NET lib in Blazor C# code, then you are free to use it --- you're right. but on the other hand i don't agree with you, because if we only need the library, why create more framework(such as this repo, design specific asp.net core library)?

from casbin-aspnetcore.

hsluoyz avatar hsluoyz commented on May 28, 2024

@AsakusaRinne

/cc @sagilio

from casbin-aspnetcore.

AsakusaRinne avatar AsakusaRinne commented on May 28, 2024

@AsakusaRinne

/cc @sagilio

OK, I'll do it, but it may need some times to get familiar with it.

from casbin-aspnetcore.

AsakusaRinne avatar AsakusaRinne commented on May 28, 2024

I'd like to use C# Casbin in frontend.

The repo already has a sample syntax like [CasbinAuthorize(nameof(BasicTest), nameof(HttpMethod.Get))], which is designed for asp.net core controller, right?

But a Blazor app can have no controller, it can have only razor page. so for a newbie(like me), there's no way to use the CasbinAuthorize attribute, at least there's no obvious way.

So I'd like suggest a Blazor sample.

if you can import Casbin.NET lib in Blazor C# code, then you are free to use it --- you're right. but on the other hand i don't agree with you, because if we only need the library, why create more framework(such as this repo, design specific asp.net core library)?

Hey, A Blazor app can have no controller, it can have only razor page ----- I guess you mean the server mode of Blazor. Besides it, Blazor also has client mode, which has controllers and frontend. Have you considered using the client mode?

from casbin-aspnetcore.

hsluoyz avatar hsluoyz commented on May 28, 2024

Fixed by: #52

from casbin-aspnetcore.

hsluoyz avatar hsluoyz commented on May 28, 2024

@LeiYangGH

from casbin-aspnetcore.

LeiYangGH avatar LeiYangGH commented on May 28, 2024

thanks a lot!

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.