mirror of https://github.com/xwiki-labs/cryptpad
Fix ownership issues with forms created from the drive
This commit is contained in:
parent
a7463c1987
commit
74707ea723
|
@ -141,12 +141,13 @@ define([
|
||||||
CPNetflux = _CPNetflux;
|
CPNetflux = _CPNetflux;
|
||||||
Pinpad = _Pinpad;
|
Pinpad = _Pinpad;
|
||||||
}));
|
}));
|
||||||
|
var personalDrive = !Cryptpad.initialTeam || Cryptpad.initialTeam === -1;
|
||||||
Cryptpad.getAccessKeys(w(function (_keys) {
|
Cryptpad.getAccessKeys(w(function (_keys) {
|
||||||
if (!Array.isArray(_keys)) { return; }
|
if (!Array.isArray(_keys)) { return; }
|
||||||
accessKeys = _keys;
|
accessKeys = _keys;
|
||||||
|
|
||||||
_keys.some(function (_k) {
|
_keys.some(function (_k) {
|
||||||
if ((!Cryptpad.initialTeam && !_k.id) || Cryptpad.initialTeam === _k.id) {
|
if ((personalDrive && !_k.id) || Cryptpad.initialTeam === _k.id) {
|
||||||
myKeys = _k;
|
myKeys = _k;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue