allow anonymous access

This commit is contained in:
Sebastian Sdorra
2010-12-30 13:44:40 +01:00
parent 422b4cab9e
commit b1a9173cd3
6 changed files with 115 additions and 24 deletions

View File

@@ -150,15 +150,27 @@ Ext.onReady(function(){
}]
}]);
}
panel.addSection({
id: 'navLogout',
title: 'Log out',
items: [{
label: 'Log out',
fn: logout
}]
});
if ( state.user.name == 'anonymous' ){
panel.addSection({
id: 'navLogin',
title: 'Login',
items: [{
label: 'Login',
fn: login
}]
});
} else {
panel.addSection({
id: 'navLogout',
title: 'Log out',
items: [{
label: 'Log out',
fn: logout
}]
});
}
//fix hidden logout button
panel.doLayout();
}