From 5a298b721b3011f8481760ba98b79e5bbe5bff30 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 14 Oct 2016 13:45:11 +0100 Subject: [PATCH] Added an 'is_admin' flag to the canvassers table. --- src/clj/youyesyet/db/schema.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clj/youyesyet/db/schema.clj b/src/clj/youyesyet/db/schema.clj index f2e58bc..33ee912 100644 --- a/src/clj/youyesyet/db/schema.clj +++ b/src/clj/youyesyet/db/schema.clj @@ -172,6 +172,7 @@ ;; encrypted passwords locally [:authority_id "varchar(32) not null references authorities(id) on delete no action"] [:introduced_by "integer references canvassers(id)"] + [:is_admin :boolean] ;; true if the canvasser is authorised to use the app; else false. This allows us to ;; block canvassers we suspect of misbehaving. [:authorised :boolean]))) @@ -181,7 +182,7 @@ (kc/pk :id) (kc/table :canvassers) (kc/database yyydb/*db*) - (kc/entity-fields :id :fullname :phone :email :authorised) + (kc/entity-fields :id :fullname :phone :email :is_admin :authorised) (kc/has-one elector) (kc/has-one address) (kc/has-one canvasser {:fk :introduced_by})