2769: implement DELETE.
authorTim Pierce <twp@curoverse.com>
Wed, 23 Jul 2014 17:40:48 +0000 (13:40 -0400)
committerTim Pierce <twp@curoverse.com>
Wed, 30 Jul 2014 17:59:20 +0000 (13:59 -0400)
commitb9d9b77e04adb656aa9ab37d2688aef7ce0b8b2a
tree7faeda08c94b3fc0387b4f5d050694fb7907997b
parent20f944be863d7d455534ebac0083c25869a3379d
2769: implement DELETE.

The DeleteHandler method implements DELETE requests for Keep, checking
that the user is authorized to issue DELETE and then deleting the
requested block from local volumes.

* CanDelete checks that the user with the given token is authorized to
  delete blocks from Keep.
* MockVolume and UnixVolume objects provide a Delete method for deleting
  a block from that volume.
* TestDeleteHandler tests:
** Unauthenticated requests
** Requests from a non-admin user
** Requests from a non-admin user for a nonexistent block
** Requests from a non-admin user for an existing block
services/keep/src/keep/handler_test.go
services/keep/src/keep/handlers.go
services/keep/src/keep/volume.go
services/keep/src/keep/volume_unix.go