Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing compatibility with Casbin EFCore Adapter #41

Closed
shayura opened this issue Feb 17, 2022 · 8 comments
Closed

Missing compatibility with Casbin EFCore Adapter #41

shayura opened this issue Feb 17, 2022 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@shayura
Copy link

shayura commented Feb 17, 2022

As it stands now, the only implementation of IEnforcerProvider inside this package, i.e. DefaultEnforcerProvider, does not integrate with Casbin EFCore Adapter.

Would you consider adding a ICasbinAuthorizationPolicyProvider compatible with the EFCore Adapter?

@casbin-bot
Copy link

@sagilio @xcaptain @huazhikui

@casbin-bot casbin-bot added the question Further information is requested label Feb 17, 2022
@gsw945
Copy link

gsw945 commented Aug 17, 2022

same question +1

@hsluoyz
Copy link
Member

hsluoyz commented Aug 17, 2022

@AsakusaRinne @sagilio

@hsluoyz hsluoyz added bug Something isn't working and removed question Further information is requested labels Aug 17, 2022
@sagilio sagilio added enhancement New feature or request and removed bug Something isn't working labels Aug 17, 2022
@sagilio sagilio self-assigned this Aug 17, 2022
@sagilio
Copy link
Member

sagilio commented Aug 17, 2022

@gsw945 @shayura You can refer to this to integrate the adapter on the current version.

We are trying a friendlier way to integrate it, like this:

IAdapter? adapter = _serviceProvider.GetService<IAdapter>();
if (adapter != null)
{
_enforcer ??= SyncedEnforcer.Create(model, adapter, true);
return _enforcer;
}

@hsluoyz
Copy link
Member

hsluoyz commented Aug 18, 2022

@AsakusaRinne plz work on this

@AsakusaRinne
Copy link
Contributor

@AsakusaRinne plz work on this

It's on process now. I would submit a PR depending on this PR for efcore-adapter

@AsakusaRinne
Copy link
Contributor

AsakusaRinne commented Sep 25, 2022

@shayura We have added a sample which integrates it with efcore-adapter (in samples/WebApplicationWithEfcoreSample). Does it get the point of what you need?

@hsluoyz
Copy link
Member

hsluoyz commented Sep 25, 2022

Closed as resolved

@hsluoyz hsluoyz closed this as completed Sep 25, 2022
@hsluoyz hsluoyz added question Further information is requested and removed enhancement New feature or request labels Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants