mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
Updated rpcd version and fixed password page
This commit is contained in:
parent
b709ec96f5
commit
ac7e1c3d10
2 changed files with 3 additions and 18 deletions
|
|
@ -82,9 +82,8 @@
|
|||
self.session.access({
|
||||
"keys": ""
|
||||
}).done(function(result){
|
||||
if(!("username" in (result.data||{}))) {
|
||||
console.log("Session: Not authenticated!");
|
||||
RPC_SESSION_ID = RPC_DEFAULT_SESSION_ID; // reset sid to 000..
|
||||
if(!("username" in result.data)) {
|
||||
console.log("Session: Not authenticated!");
|
||||
deferred.reject();
|
||||
} else {
|
||||
self.$session = result;
|
||||
|
|
@ -93,7 +92,7 @@
|
|||
deferred.resolve(result);
|
||||
}
|
||||
}).fail(function err(result){
|
||||
RPC_SESSION_ID = RPC_DEFAULT_SESSION_ID;
|
||||
self.sid = RPC_DEFAULT_SESSION_ID;
|
||||
deferred.reject();
|
||||
});
|
||||
return deferred.promise();
|
||||
|
|
|
|||
|
|
@ -15,20 +15,6 @@ describe("Settings", function(){
|
|||
it("should have required rpc functions", function(){
|
||||
expect($rpc.luci2.system.password_set).to.be.a(Function);
|
||||
});
|
||||
it("should be able to check for online upgrade", function(done){
|
||||
$rpc.luci2.system.upgrade_check({type: "online"}).done(function(){
|
||||
done();
|
||||
}).fail(function(){
|
||||
throw new Error("Could not check for online upgrade!");
|
||||
});
|
||||
});
|
||||
it("should be able to check for usb upgrade", function(done){
|
||||
$rpc.luci2.system.upgrade_check({type: "usb"}).done(function(){
|
||||
done();
|
||||
}).fail(function(){
|
||||
throw new Error("Could not check for online upgrade!");
|
||||
});
|
||||
});
|
||||
it("should not be able to set password without providing current password", function(done){
|
||||
console.log("Trying to set password for user "+PARAMS.username);
|
||||
$rpc.luci2.system.password_set({"user": PARAMS.username, "password": "abrakadabra"}).done(function(){
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue