witten
/
luminotes
Archived
1
0
Fork 0

You can now copy the Luminotes Desktop URL and paste it into another web browser without getting an error message.

This commit is contained in:
Dan Helfman 2009-02-16 14:25:24 -08:00
parent 78cac16bde
commit 42cff5421c
3 changed files with 27 additions and 6 deletions

13
NEWS
View File

@ -1,11 +1,14 @@
1.6.6: ?
* Luminotes Desktop now has a "close" link at the top of the page to
completely shut down the process.
* Luminotes Desktop now attempts to always run on a particular port number,
which means that as long as it's running you can reach it from a constant
URL.
* Luminotes now recognizes "mailto:" links as external links, so you can
include links to email addresses within your notes.
* Several Luminotes Desktop improvements:
* There is now a "close" link at the top of the page to completely shut down
the process when you're done using Luminotes.
* Luminotes Desktop now attempts to always run on a particular port number,
which means that as long as it's running you can reach it from a constant
URL.
* You can now copy the Luminotes Desktop URL and paste it into another
web browser without getting an error message.
1.6.5: February 12, 2009
* Now ignoring even more unneeded HTML tags from an MS Word copy-and-paste.

View File

@ -143,8 +143,10 @@ def grab_user_id( function ):
return function( *args, **kwargs )
except Access_error:
# if there was an Access_error, and the user isn't logged in, and this is an HTTP GET request,
# redirect to the login page
# redirect to the login page. that is, unless there is an auto-login username
if cherrypy.session.get( "user_id" ) is None and cherrypy.request.method == "GET":
if cherrypy.config.configs[ u"global" ].get( u"luminotes.auto_login_username" ):
raise cherrypy.HTTPRedirect( u"%s/" % cherrypy.request.base )
original_path = cherrypy.request.path + \
( cherrypy.request.query_string and u"?%s" % cherrypy.request.query_string or "" )
raise cherrypy.HTTPRedirect( u"%s/login?after_login=%s" % ( cherrypy.request.base, urllib.quote( original_path ) ) )

View File

@ -165,6 +165,22 @@ class Test_notebooks( Test_controller ):
user = self.database.load( User, self.user.object_id )
assert user.storage_bytes == 0
def test_default_without_login_using_auto_login( self ):
cherrypy.config.configs[ u"global" ][ u"luminotes.auto_login_username" ] = u"someone"
try:
path = "/notebooks/%s" % self.notebook.object_id
result = self.http_get( path )
headers = result.get( "headers" )
assert headers
assert headers.get( "Location" ) == u"http:///"
user = self.database.load( User, self.user.object_id )
assert user.storage_bytes == 0
finally:
del( cherrypy.config.configs[ u"global" ][ u"luminotes.auto_login_username" ] )
def test_default_forum( self ):
self.login()