-
Notifications
You must be signed in to change notification settings - Fork 1
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
Enable policy opts in query and transact #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work in EDN too?
@@ -4,3 +4,4 @@ | |||
/target/* | |||
.clj-kondo/babashka | |||
.clj-kondo/metosin | |||
.dir-locals.el |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the tiniest of nitpicks but these editor-specific ignores might be better in your global gitignore (e.g. ~/.gitignore
which I think you have to then tell git to use in its config). However, I know Emacs is a pretty popular choice around here and for Clojure in general 😉 so I'm fine with it either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have this in our gitignores on db
and json-ld
, so I actually originally assumed its absence here was an oversight.
Emacs is pretty popular among lispers, so it's convenient to have it, but I won't die on this hill either 😄
test/fluree/http_api/system_test.clj
Outdated
{:ledger ledger-name | ||
:query (assoc secret-query | ||
:opts {"role" "ex:userRole" | ||
"did" alice-did})}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unindent one space?
test/fluree/http_api/system_test.clj
Outdated
(-> query-res :body json/read-value)) | ||
"query policy opts should prevent seeing bob's secret") | ||
(let [txn-req {:body | ||
(json/write-value-as-string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unindent three spaces?
@cap10morgan thanks for reminding me about edn, I added support and some tests. And I had actually neglected to clean up my whitespace generally, so I just ran some formatting on all my new tests and pushed it up. It ended up changing more than what you had suggested, but it should now be consistent at least. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Closes #38
Depends on fluree/db#445
Adds handling of policy-relevant opts (
"did"
and"role"
for now), so that they can be passed in to queries and transactions.