[xiph-commits] r3304 - in arkaiv/trunk/arkaiv: config controllers
dcrowdy at svn.annodex.net
dcrowdy at svn.annodex.net
Sat Dec 8 03:10:47 PST 2007
Author: dcrowdy
Date: 2007-12-08 03:10:46 -0800 (Sat, 08 Dec 2007)
New Revision: 3304
Modified:
arkaiv/trunk/arkaiv/config/middleware.py
arkaiv/trunk/arkaiv/config/middleware.pyc
arkaiv/trunk/arkaiv/controllers/page.py
arkaiv/trunk/arkaiv/controllers/page.pyc
Log:
Disabled authentication until more testing has been done. Trapped error if user doesn't supply a source file when adding media.
Modified: arkaiv/trunk/arkaiv/config/middleware.py
===================================================================
--- arkaiv/trunk/arkaiv/config/middleware.py 2007-12-07 21:54:24 UTC (rev 3303)
+++ arkaiv/trunk/arkaiv/config/middleware.py 2007-12-08 11:10:46 UTC (rev 3304)
@@ -36,9 +36,8 @@
app = PylonsApp()
# CUSTOM MIDDLEWARE HERE (filtered by the error handling middlewares)
- import authkit.authenticate
- #app = authkit.authenticate.middleware(app, config_paste=app_conf)
- app = authkit.authenticate.middleware(app, app_conf)
+ # import authkit.authenticate
+ # app = authkit.authenticate.middleware(app, app_conf)
if asbool(full_stack):
# Handle Python exceptions
Modified: arkaiv/trunk/arkaiv/config/middleware.pyc
===================================================================
(Binary files differ)
Modified: arkaiv/trunk/arkaiv/controllers/page.py
===================================================================
--- arkaiv/trunk/arkaiv/controllers/page.py 2007-12-07 21:54:24 UTC (rev 3303)
+++ arkaiv/trunk/arkaiv/controllers/page.py 2007-12-08 11:10:46 UTC (rev 3304)
@@ -22,7 +22,7 @@
from arkaiv.controllers import *
from arkaiv.lib.base import *
from paste.deploy import CONFIG
-from authkit.permissions import NotAuthenticatedError
+#from authkit.permissions import NotAuthenticatedError
from pylons import config
from arkaiv.model.oggzinfo import OggzInfo
#from arkaiv.model.anxparser import anxParser
@@ -211,9 +211,9 @@
except:
c.playclip = ""
- if toedit == "yes":
- if not request.environ.has_key('REMOTE_USER'):
- raise NotAuthenticatedError('Not Authenticated')
+ #if toedit == "yes":
+ # if not request.environ.has_key('REMOTE_USER'):
+ # raise NotAuthenticatedError('Not Authenticated')
c.itemid = itemid
c.itemname = model.getitemname(itemid)
@@ -377,6 +377,10 @@
cmmlsource = request.POST['cmmlfile']
oggsource = request.POST['oggfile']
+ # If there is no ogg file, then return an error
+ if (oggsource == ""):
+ return render ('/nosourcefileerror.mak')
+
if (self.__addmediatoarchive(cmmlsource, oggsource) == "file exists"):
return render ('/fileexistsmessage.mak')
else:
@@ -577,12 +581,10 @@
# return
def __localdirimport(self, cmmlfilename, oggfilename):
- print "well we get here"
print os.path.split(cmmlfilename)
# if os.path.split(cmmlfilename)[1] == "":
if (not os.path.isfile(cmmlfilename)):
# create new cmmlfile
- print "going to create a new cmmlfile"
baseoggname = os.path.split(oggfilename)[1]
basecmmlname = os.path.splitext(baseoggname)[0].replace(' ',"") + ".cmml"
print "basecmmlname: " + basecmmlname
@@ -694,6 +696,28 @@
model.additemtocollection(headinfo['itemid'], collection)
return
+ def displayhelp(self):
+ return render('/help.mak')
+
+ def deletemeta(self):
+ metaid = request.params['metaid']
+ itemid = request.params['itemid']
+ headid = request.params['headid']
+ print "itemid is" + str(itemid)
+ model.deletemeta(metaid)
+ # easier to read meta info and add all in one go?
+ metalist = model.getmetasforhead(headid)
+ print metalist
+ # now write these back to the cmml file
+# parser = ...
+ cmmlfile = model.getitemcmmlfile(itemid)
+ parser = cmmlParser()
+ parser.setcmmlfilename(cmmlfile)
+ parser.syncheadmetas(metalist)
+
+ redirect_to(action='displayitem', id=itemid, edit="yes")
+
+
def __createimageforclip(self, cmmlfile, clipinfo):
# print "cmmlfile: " + cmmlfile
# print clipinfo
@@ -718,27 +742,6 @@
# print imagefile
return imagefile
- def displayhelp(self):
- return render('/help.mak')
-
- def deletemeta(self):
- metaid = request.params['metaid']
- itemid = request.params['itemid']
- headid = request.params['headid']
- print "itemid is" + str(itemid)
- model.deletemeta(metaid)
- # easier to read meta info and add all in one go?
- metalist = model.getmetasforhead(headid)
- print metalist
- # now write these back to the cmml file
-# parser = ...
- cmmlfile = model.getitemcmmlfile(itemid)
- parser = cmmlParser()
- parser.setcmmlfilename(cmmlfile)
- parser.syncheadmetas(metalist)
-
- redirect_to(action='displayitem', id=itemid, edit="yes")
-
def __geturlforcmmlfile(self, cmmlfile, clipid):
""" Given a cmml filename and clipid (optional), returns
url information - a base path and the clip id detail
Modified: arkaiv/trunk/arkaiv/controllers/page.pyc
===================================================================
(Binary files differ)
More information about the commits
mailing list