do not allow renaming INBOX

This commit is contained in:
Andris Reinman 2017-07-20 22:24:39 +03:00
parent 7cd3eb5a13
commit ee6793c938

View file

@ -95,6 +95,9 @@ class MailboxHandler {
if (!mailboxData) {
return callback(null, 'NONEXISTENT');
}
if (mailboxData.path === 'INBOX') {
return callback(null, 'CANNOT');
}
this.database.collection('mailboxes').findOne({
user: mailboxData.user,
path: newname