From b68dd4bf59f0f3ac346a498ae762ccaddf440dc2 Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 21 Mar 2009 21:58:49 +0000 Subject: [PATCH] fix the fix for ensuring POST git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4210 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi/actions.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/roundup/cgi/actions.py b/roundup/cgi/actions.py index 425dec2..0f42319 100755 --- a/roundup/cgi/actions.py +++ b/roundup/cgi/actions.py @@ -105,7 +105,7 @@ class RetireAction(Action): """Retire the context item.""" # ensure modification comes via POST if self.client.env['REQUEST_METHOD'] != 'POST': - self.client.error_message.append(self._('Invalid request')) + raise roundup.exceptions.Reject(self._('Invalid request')) # if we want to view the index template now, then unset the itemid # context info (a special-case for retire actions on the index page) @@ -284,7 +284,7 @@ class EditCSVAction(Action): """ # ensure modification comes via POST if self.client.env['REQUEST_METHOD'] != 'POST': - self.client.error_message.append(self._('Invalid request')) + raise roundup.exceptions.Reject(self._('Invalid request')) # figure the properties list for the class cl = self.db.classes[self.classname] @@ -587,7 +587,7 @@ class EditItemAction(EditCommon): """ # ensure modification comes via POST if self.client.env['REQUEST_METHOD'] != 'POST': - self.client.error_message.append(self._('Invalid request')) + raise roundup.exceptions.Reject(self._('Invalid request')) user_activity = self.lastUserActivity() if user_activity: @@ -633,7 +633,7 @@ class NewItemAction(EditCommon): ''' # ensure modification comes via POST if self.client.env['REQUEST_METHOD'] != 'POST': - self.client.error_message.append(self._('Invalid request')) + raise roundup.exceptions.Reject(self._('Invalid request')) # parse the props from the form try: @@ -819,7 +819,7 @@ class RegisterAction(RegoCommon, EditCommon): """ # ensure modification comes via POST if self.client.env['REQUEST_METHOD'] != 'POST': - self.client.error_message.append(self._('Invalid request')) + raise roundup.exceptions.Reject(self._('Invalid request')) # parse the props from the form try: @@ -937,7 +937,7 @@ class LoginAction(Action): """ # ensure modification comes via POST if self.client.env['REQUEST_METHOD'] != 'POST': - self.client.error_message.append(self._('Invalid request')) + raise roundup.exceptions.Reject(self._('Invalid request')) # we need the username at a minimum if not self.form.has_key('__login_name'): @@ -1086,11 +1086,11 @@ class Bridge(BaseAction): def permission(self, args): """Raise Unauthorised if the current user is not allowed to execute this action. Users may override this method.""" - + pass def handle(self, args): - + raise NotImplementedError # vim: set filetype=python sts=4 sw=4 et si : -- 2.30.2