[csw-devel] SF.net SVN: gar:[20174] csw/mgar/gar/v2/lib/web/releases_web.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Jan 19 18:44:24 CET 2013


Revision: 20174
          http://gar.svn.sourceforge.net/gar/?rev=20174&view=rev
Author:   wahwah
Date:     2013-01-19 17:44:24 +0000 (Sat, 19 Jan 2013)
Log Message:
-----------
releases-web: Return 403 when not allowed

When not allowed to upload to a catalog, return a 403 forbidden. This is
a better HTTP response code for this kind of condition.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/web/releases_web.py

Modified: csw/mgar/gar/v2/lib/web/releases_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/releases_web.py	2013-01-19 17:44:13 UTC (rev 20173)
+++ csw/mgar/gar/v2/lib/web/releases_web.py	2013-01-19 17:44:24 UTC (rev 20174)
@@ -150,7 +150,7 @@
     if catrel_name not in CAN_UPLOAD_TO_CATALOGS:
       # Updates via web are allowed only for the unstable catalog.
       # We should return an error message instead.
-      raise web.notfound()
+      raise web.forbidden()
     try:
       if arch_name == 'all':
         raise checkpkg_lib.CatalogDatabaseError(

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list