Logout command supported
This commit is contained in:
parent
948cac6b58
commit
8e99be5521
2 changed files with 24 additions and 0 deletions
|
@ -192,6 +192,7 @@
|
|||
"echo",
|
||||
"eval",
|
||||
"find",
|
||||
"logout",
|
||||
"ls",
|
||||
"man",
|
||||
"pwd",
|
||||
|
|
23
commands/logout.json
Normal file
23
commands/logout.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name" : "logout",
|
||||
|
||||
"info" : {
|
||||
"syntax" : "logout",
|
||||
"brief" : "End the current user session",
|
||||
},
|
||||
|
||||
"action" : function ( arg )
|
||||
{
|
||||
var out = '';
|
||||
|
||||
if ( shell.user == shell.json.user )
|
||||
{
|
||||
return out;
|
||||
}
|
||||
|
||||
shell.user = shell.json.user;
|
||||
document.cookie = '';
|
||||
return out;
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in a new issue