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:
parent
0d5610fa80
commit
5d97c2b194
|
@ -8,3 +8,4 @@ DROP TABLE password_reset;
|
|||
DROP TABLE user_notebook;
|
||||
DROP TABLE invite;
|
||||
DROP TABLE file;
|
||||
DROP FUNCTION drop_html_tags( text );
|
||||
|
|
|
@ -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 ):
|
||||
|
|
|
@ -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__(
|
||||
|
|
Reference in New Issue