Fix ownership issues with forms created from the drive

This commit is contained in:
yflory 2022-12-19 11:50:32 +01:00
parent a7463c1987
commit 74707ea723
1 changed files with 2 additions and 1 deletions

View File

@ -141,12 +141,13 @@ define([
CPNetflux = _CPNetflux;
Pinpad = _Pinpad;
}));
var personalDrive = !Cryptpad.initialTeam || Cryptpad.initialTeam === -1;
Cryptpad.getAccessKeys(w(function (_keys) {
if (!Array.isArray(_keys)) { return; }
accessKeys = _keys;
_keys.some(function (_k) {
if ((!Cryptpad.initialTeam && !_k.id) || Cryptpad.initialTeam === _k.id) {
if ((personalDrive && !_k.id) || Cryptpad.initialTeam === _k.id) {
myKeys = _k;
return true;
}