remove name collisions

integration-tests
Josha von Gizycki 6 years ago
parent 923bd69754
commit e1630fd848

@ -8,8 +8,8 @@
[wanijo.schema.domain :as domain-schema] [wanijo.schema.domain :as domain-schema]
[wanijo.attribute.domain :as domain-attr])) [wanijo.attribute.domain :as domain-attr]))
(defn attr-type->widget [type] (defn attr-type->widget [attr-type]
(case type (case attr-type
("markdown" "text") :textarea ("markdown" "text") :textarea
:input)) :input))

@ -96,11 +96,11 @@
-[:permission {type:{type}}]- -[:permission {type:{type}}]-
(s)) AS is_public") (s)) AS is_public")
(defn has-user-permission? [type schema-uuid user-uuid] (defn has-user-permission? [perm-type schema-uuid user-uuid]
(let [permissions (first (neo4j/exec-query! schema-permissions (let [permissions (first (neo4j/exec-query! schema-permissions
{:schema_uuid schema-uuid {:schema_uuid schema-uuid
:user_uuid user-uuid :user_uuid user-uuid
:type type})) :type perm-type}))
public? (neo4j/bool (:is_public permissions)) public? (neo4j/bool (:is_public permissions))
user? (neo4j/bool (:user_has_permission permissions))] user? (neo4j/bool (:user_has_permission permissions))]
(or public? user?))) (or public? user?)))

Loading…
Cancel
Save