We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Can I write all policies for different resources in one json file? if yes how to use it?
The text was updated successfully, but these errors were encountered:
Yes, you can write them in one json file and read that file inside the method get_policy_statements. Here is the Pseudocode for that.
get_policy_statements
import json class YourCustomAccessPolicy(AccessPolicy): id = 'custom-policy' def get_policy_statements(self, request, view) -> List[dict]: statements = open('data.json') return json.loads(statements)
Sorry, something went wrong.
No branches or pull requests
Can I write all policies for different resources in one json file? if yes how to use it?
The text was updated successfully, but these errors were encountered: