             [:label
              [:input {:type "checkbox"
                       :name (permission-key resource-type action)
-                      :checked (grants/has-permission grant resource-type action)}]
+                      :checked (grants/has-permission grant resource-type action)
+                      :value 1}]
              (humanize action)]])
          grants/actions)]])
 

                      (authorize :new))))
  ([{{entity :entity} :params} grant]
   (with-layout (format "User grants for entity %s" (:name entity)) {}
     [:div.row
      [:div.col-md-6
       (form (format "/entities/%s/grants" (:id entity)) {}

            [clj-money.validation :as validation]
            [clj-money.inflection :refer [humanize]]
            [clj-money.models.entities :as entities]
            [clj-money.models.users :as users]
            [clj-money.models.grants :as grants])
  (:use [clj-money.web.shared :refer :all]))

(defn- grant-row
  [grant]
  (let [user (users/find-by-id (env :db) (:user-id grant))]
    [:tr
     [:td (users/full-name user)]
     [:td (:email user)]]))

(defn index
  [{{entity :entity} :params}]
  (with-layout (format "User grants for entity %s" (:name entity)) {}
    (let [grants (grants/search
                   (env :db)
                   (apply-scope {:entity-id (:id entity)} :grant))]
      [:div.row
       [:div.col-md-6
        [:table.table.table-striped
