require POST for tag and untag routes
authorChuck Hagenbuch <chuck@horde.org>
Wed, 24 Dec 2008 19:32:17 +0000 (14:32 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 27 Dec 2008 02:29:18 +0000 (21:29 -0500)
content/config/routes.php

index 4fa5cf4..d5abf1e 100644 (file)
@@ -26,11 +26,13 @@ $mapper->connect('users.:(format)', array('controller' => 'tag', 'action' => 'se
 
 // Tag an object. Required POST parameters are: tags (array or string list) and
 // objectId. userId is inferred from the authenticated user:
-$mapper->connect('tag', array('controller' => 'tag', 'action' => 'tag'));
+$mapper->connect('tag', array('controller' => 'tag', 'action' => 'tag',
+                              'conditions' => array('method' => array('POST'))));
 
 // Untag an object. Required POST parameters are: tags (array or string list)
 // and objectId. userId is inferred from the authenticated user:
-$mapper->connect('untag', array('controller' => 'tag', 'action' => 'untag'));
+$mapper->connect('untag', array('controller' => 'tag', 'action' => 'untag',
+                                'conditions' => array('method' => array('POST'))));
 
 
 // Local route overrides