-
-
Notifications
You must be signed in to change notification settings - Fork 201
add_policies only updates policies, but not policy_map #356
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
Comments
@techoner @Nekotoxin |
@derberni try other languages like Go, Java, Node Casbin |
I checked the Go source code for AddPolicies, and it works correctly. Basically the Go AddPolicies calls AddPolicy for each policy. The python code for add_policies does not use add_policy internally, but directly appends the policy list to the model. |
Task: need to port the policy_map handling from Go to Python. See the below links. Note: consider not only Go: Python: pycasbin/casbin/model/policy.py Lines 149 to 159 in 7b64b85
|
If you compare the two functions for adding a single, or multiple policies in model/policy.py, the add_policies method only appends the new rules, but does not update the policy_map if a priority is given for the rule.
The text was updated successfully, but these errors were encountered: