-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Casbin.net Breaking changes while migrating from V1.13.0 to V2.9.1 - Enforcer class #366
Comments
@shrey-shah why create two issues? #367 |
It looks like two different issues |
Here is a sample for this issue. public class CustomEnforcer : Enforcer
{
public CustomEnforcer(string modelText, string policyText)
: base(DefaultModel.CreateFromText(modelText),
new FileAdapter(ReadPolicyText(policyText)))
{
}
private static MemoryStream ReadPolicyText(string policyText)
{
return new MemoryStream(Encoding.UTF8.GetBytes(policyText));
}
} |
my model and policy are like this: #367 (comment) |
any update here? |
It need not now. we will add new API for it. |
I am trying to migrate Casbin.net package from V1.13.0 to V2.9.1. My Enforcer class used to look like this in the previous version.
I have changed it like this.
is this correct? Do I need to do anything else? earlier version had a separate class with the implementation of DefaultFileContentAdapter. Do we need this in the latest version?
The text was updated successfully, but these errors were encountered: