Skip to content

Commit

Permalink
Checking for LAN Tessels to be authorized for renaming
Browse files Browse the repository at this point in the history
fixes #366
  • Loading branch information
Student007 committed Oct 6, 2015
1 parent 8848a73 commit 894b2d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,12 @@ controller.renameTessel = function(opts) {
})
.then(function executeRename() {
return controller.standardTesselCommand(opts, function(tessel) {
return tessel.rename(opts);
if (tessel.lanConnection && !tessel.lanConnection.authorized) {
logs.warn('You are not allowed to rename not authorized Tessels (use different --key)');
return;
} else {
return tessel.rename(opts);
}
});
});
};
Expand Down

1 comment on commit 894b2d5

@Student007
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnnyman727 required for rebased --key option PR (coming soon).

Please sign in to comment.