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:
parent
953f572b20
commit
ca61369963
4
NEWS
4
NEWS
|
@ -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
|
1.3.35: May 19, 2008
|
||||||
* Potential fix for bug where caching of Notebook objects can cause
|
* Potential fix for bug where caching of Notebook objects can cause
|
||||||
read-write notebooks to display as read-only.
|
read-write notebooks to display as read-only.
|
||||||
|
|
|
@ -38,9 +38,13 @@ function Wiki( invoker ) {
|
||||||
this.notebooks_by_id = {};
|
this.notebooks_by_id = {};
|
||||||
|
|
||||||
for ( var i in this.notebooks ) {
|
for ( var i in this.notebooks ) {
|
||||||
this.notebooks_by_id[ this.notebooks[ i ].object_id ] = this.notebooks[ i ];
|
var notebook = this.notebooks[ i ];
|
||||||
if ( this.notebooks[ i ].object_id == this.notebook_id )
|
|
||||||
this.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 ) {
|
if ( this.notebook && this.notebook.read_write ) {
|
||||||
|
|
Reference in New Issue