Adds manager type, blocks certain permissions

This commit is contained in:
Bryce Covert
2020-05-29 07:14:40 -07:00
parent e77e02137c
commit d9bf9867e4
19 changed files with 122 additions and 92 deletions

View File

@@ -256,7 +256,9 @@
{:db/ident :forecasted-transaction/identifier
:db/doc "An identifier for this forcasted transaction, e.g., 'RENT'"
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}]]}}]
:db/cardinality :db.cardinality/one}]]}
:auto-ap/add-manager-schema {:txes [[{:db/ident :user-role/manager}]]}}
]
(println "Conforming database...")
(c/ensure-conforms conn norms-map)
(when (not (seq args))

View File

@@ -18,8 +18,7 @@
:in ['$]
:where []}
:args [(d/db (d/connect uri))]}
(add-arg '?e id ['?e])
(doto println))]
(add-arg '?e id ['?e]))]
(->> (d/query query)
(map first)
@@ -47,7 +46,6 @@
(let [new-user-trans @(d/transact (d/connect uri) [(cond-> new-user
true (assoc :db/id "user")
is-first-user? (assoc :user/role :user-role/admin))])]
(println new-user-trans)
(get-by-id (-> new-user-trans :tempids (get "user")))))))
(defn raw-graphql [args]