mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
added logout method
This commit is contained in:
@@ -76,6 +76,22 @@ Ext.onReady(function(){
|
||||
addTabPanel('t_config', 'configPanel', 'Repository Config');
|
||||
}
|
||||
|
||||
function logout(){
|
||||
Ext.Ajax.request({
|
||||
url: restUrl + 'authentication/logout.json',
|
||||
method: 'GET',
|
||||
success: function(response){
|
||||
tabPanel.removeAll();
|
||||
Ext.getCmp('west').removeAll();
|
||||
var loginWin = new Sonia.login.Window();
|
||||
loginWin.show();
|
||||
},
|
||||
failure: function(){
|
||||
alert("logout failed");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function createMainMenu(){
|
||||
var panel = Ext.getCmp('west');
|
||||
panel.addSections([{
|
||||
@@ -96,6 +112,12 @@ Ext.onReady(function(){
|
||||
label: 'Server',
|
||||
fn: function(){ console.debug( 'Server Config' ); }
|
||||
}]
|
||||
},{
|
||||
title: 'Abmelden',
|
||||
items: [{
|
||||
label: 'Abmelden',
|
||||
fn: logout
|
||||
}]
|
||||
}]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user