 (def all-permissions
   "The set of all permissions checked and returned by the functions below."
   #{:read :order :update :delete})
+
+(def provider-level-permissions
+  "The set of permissions that are checked at the provider level."
+  #{:update :delete})
 
 (defn- collect-permissions
   "Returns seq of any permissions where (grants-permission? acl permission) returns true for any acl in acls."

  ([context acl action]
   (acl-log-message context acl nil action))
  ([context new-acl existing-acl action]
   ;(let [user (context->user-id context)])
   (let [user (tokens/get-user-id context (:token context))]
     (cond
       (= action :create) (format "User: [%s] Created ACL [%s]" user new-acl)

    (cpv/validate-parameters
      :acl safe-params
      (concat cpv/common-validations
              [permitted-group-validation identity-type-validation group-permission-validation])
      type-errors))
  params)

