This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-06
Channels
- # aleph (2)
- # aws (3)
- # bangalore-clj (3)
- # beginners (119)
- # boot (263)
- # cider (13)
- # cljs-dev (16)
- # clojars (2)
- # clojure (114)
- # clojure-austin (1)
- # clojure-chicago (1)
- # clojure-finland (1)
- # clojure-france (24)
- # clojure-italy (6)
- # clojure-russia (28)
- # clojure-serbia (7)
- # clojure-spain (1)
- # clojure-spec (89)
- # clojure-uk (139)
- # clojurescript (216)
- # community-development (3)
- # core-async (135)
- # css (2)
- # cursive (31)
- # datomic (44)
- # emacs (15)
- # hoplon (2)
- # jobs (3)
- # lein-figwheel (14)
- # leiningen (2)
- # lumo (21)
- # off-topic (16)
- # om (7)
- # om-next (1)
- # onyx (53)
- # perun (9)
- # planck (15)
- # portland-or (29)
- # protorepl (2)
- # re-frame (32)
- # reagent (8)
- # ring-swagger (22)
- # rum (51)
- # spacemacs (4)
- # untangled (2)
I tried to retract entity with
transacted payload [[:db.fn/retractEntity 13194139534407]]
and got java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: :db.error/reset-tx-instant You can set :db/txInstant only on the current transaction.
error. Not really sure what I did wrong. Any tips?@podviaznikov You are attempting to retract a transaction id, but you are not allowed to alter the :db/txInstant assertion on transaction entities.
favila: that id is entity id. Unless they can be the same. But there is definitely an entity behind the id
We’re beginning to write web service handlers around datomic, and I’m grappling with the question of where and how to enforce authorization. Do folk tend to e.g. write a predicate fn for a user and an arbitrary datomic transaction, or check authorization for specific mutations?
@donaldball I know some people use db filter with user-based predicate to enforce visiblity, but that is belt-and-suspenders
an idea we had was post-validation: run the tx with a db/with, then validate no constraints were violated (data or security), then transact with a conditional to ensure integrity
I've used a list of (prismatic) schemas to validate incoming transactions
it worked well but wasn't fine-grained (all admins can transact all transactions matching any whitelisted schema)
@donaldball we handle authorization on a per-operation basis.
(I should add that we don't provide our clients an expressive language à la GraphQL / Datomic Pull)
We’re anticipating using om.next, but as I understand it, the common path even there is for the client to send the server a named mutation operation with some arguments, so y’all’s advice is well taken. Thanks.
completely agnostic to the datomic schema / model, supports any number of roles, access groups and access rules.
Hey @marshall or someone who can fix it: http://www.datomic.com/videos.html