O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — adding a validate function to ensure that only creators can update or delete their documents

Adding validate functions can be a bit odd, because unlike views, there isn't a nice interface in Futon for us to use. The quickest way to add the validate_doc_update function is to treat it like a normal field in our document and type the code right into the value. It's a bit strange, but it is the quickest way to adjust design documents. At the end of the chapter, I'll give you some resources if you want to get a bit cleaner with how you manage design documents.

  1. Open your browser and go to Futon (http://localhost:5984/_utils/).
  2. Make sure that you are logged in to the admin account by checking that the bottom right column says Welcome ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required