This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | -- Create a readonly role | |
| CREATE ROLE readonly; | |
| -- Connect to the database on which you want to modify the user's privileges on. | |
| -- Grant connect on the database. | |
| GRANT CONNECT ON DATABASE database TO readonly; | |
| -- Grant usage on the schema. | |
| GRANT USAGE ON SCHEMA schema TO readonly; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ; (./pull '[prismatic/schema "1.1.3"]) | |
| (require '[schema.core :as schema]) | |
| (require '[schema.coerce :as coerce]) | |
| ;; let's define some matchers | |
| (def matchers | |
| {:string coerce/string-coercion-matcher ;; used with ring query-, path- & form-params | |
| :json coerce/json-coercion-matcher ;; used with body/response for "application/json" | |
| :edn (constantly nil)}) ;; used with body/response for "application/edn" |