witten
/
luminotes
Archived
1
0
Fork 0

Fix for bug where read-write notebooks that the anonymous user had

read-only access to would show up as read-only, even when logged in.
This commit is contained in:
Dan Helfman 2008-05-20 00:51:23 -07:00
parent 953f572b20
commit ca61369963
2 changed files with 11 additions and 3 deletions

4
NEWS
View File

@ -1,3 +1,7 @@
1.3.36: May 19, 2008
* Fix for bug where read-write notebooks that the anonymous user had
read-only access to would show up as read-only, even when logged in.
1.3.35: May 19, 2008
* Potential fix for bug where caching of Notebook objects can cause
read-write notebooks to display as read-only.

View File

@ -38,9 +38,13 @@ function Wiki( invoker ) {
this.notebooks_by_id = {};
for ( var i in this.notebooks ) {
this.notebooks_by_id[ this.notebooks[ i ].object_id ] = this.notebooks[ i ];
if ( this.notebooks[ i ].object_id == this.notebook_id )
this.notebook = this.notebooks[ i ]
var notebook = this.notebooks[ i ];
if ( !this.notebooks_by_id[ notebook.object_id ] )
this.notebooks_by_id[ notebook.object_id ] = notebook;
if ( !this.notebook && notebook.object_id == this.notebook_id )
this.notebook = notebook;
}
if ( this.notebook && this.notebook.read_write ) {