mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Merge remote-tracking branch 'origin/oo_import_users_check' into staging
This commit is contained in:
commit
e1345d96dd
@ -2813,14 +2813,21 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
|
||||
});
|
||||
};
|
||||
|
||||
var importFile = function(content) {
|
||||
// Abort if there is another real user in the channel (history keeper excluded)
|
||||
// Abort if there is another real user in the channel (history keeper excluded)
|
||||
var checkChannelUsers = function () {
|
||||
var m = metadataMgr.getChannelMembers().slice().filter(function (nId) {
|
||||
return nId.length === 32;
|
||||
});
|
||||
if (m.length > 1) {
|
||||
UI.removeModals();
|
||||
return void UI.alert(Messages.oo_cantUpload);
|
||||
UI.alert(Messages.oo_cantUpload);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
var importFile = function(content) {
|
||||
if (checkChannelUsers()) {
|
||||
return;
|
||||
}
|
||||
if (!content) {
|
||||
UI.removeModals();
|
||||
@ -2862,6 +2869,10 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
|
||||
if (!supportsXLSX()) {
|
||||
return void UI.alert(Messages.oo_invalidFormat);
|
||||
}
|
||||
if (checkChannelUsers()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var div = h('div.cp-oo-x2tXls', [
|
||||
Icons.get('loading'),
|
||||
h('span', Messages.oo_importInProgress)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user