witten
/
luminotes
Archived
1
0
Fork 0

Fixed minor bug in initdb that caused initial anonymous user creation with

owner permission to main notebook.

Fixed variable shadowing bug when picking out notebook to use in header "my
wiki" link.
This commit is contained in:
Dan Helfman 2008-04-04 07:54:17 +00:00
parent 0d5610fa80
commit 5d97c2b194
3 changed files with 3 additions and 2 deletions

View File

@ -8,3 +8,4 @@ DROP TABLE password_reset;
DROP TABLE user_notebook;
DROP TABLE invite;
DROP TABLE file;
DROP FUNCTION drop_html_tags( text );

View File

@ -66,7 +66,7 @@ class Initializer( object ):
self.database.save( self.anonymous, commit = False )
# give the anonymous user read-only access to the main notebook
self.database.execute( self.anonymous.sql_save_notebook( self.main_notebook.object_id, read_write = False ), commit = False )
self.database.execute( self.anonymous.sql_save_notebook( self.main_notebook.object_id, read_write = False, owner = False ), commit = False )
def main( args = None ):

View File

@ -101,7 +101,7 @@ class Main_page( Page ):
"Luminotes privacy policy": "privacy",
}.get( header_note_title, header_note_title )
own_notebooks = [ notebook for notebook in notebooks if notebook.read_write is True ]
own_notebooks = [ nb for nb in notebooks if nb.read_write is True ]
header_notebook = own_notebooks and own_notebooks[ 0 ] or notebook
Page.__init__(