mirror of https://github.com/xwiki-labs/cryptpad
Merge branch 'staging' into main
This commit is contained in:
commit
16c9524a6a
|
@ -31,7 +31,7 @@ fi
|
|||
cd $CPAD_HOME
|
||||
|
||||
if [ "$CPAD_INSTALL_ONLYOFFICE" == "yes" ]; then
|
||||
./install-onlyoffice.sh --accept-license
|
||||
./install-onlyoffice.sh --accept-license --trust-repository
|
||||
fi
|
||||
|
||||
npm run build
|
||||
|
|
|
@ -69,6 +69,10 @@ parse_arguments() {
|
|||
ACCEPT_LICENSE="1"
|
||||
shift
|
||||
;;
|
||||
-t | --trust-repository)
|
||||
TRUST_REPOSITORY="1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
show_help
|
||||
shift
|
||||
|
@ -110,17 +114,26 @@ OPTIONS:
|
|||
Accept the license of OnlyOffice and do not ask when running this
|
||||
script. Read and accept this before using this option:
|
||||
https://github.com/ONLYOFFICE/web-apps/blob/master/LICENSE.txt
|
||||
|
||||
-t, --trust-repository
|
||||
Automatically configure the cloned onlyoffice-builds repository
|
||||
as a safe.directory.
|
||||
https://git-scm.com/docs/git-config/#Documentation/git-config.txt-safedirectory
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
ensure_oo_is_downloaded() {
|
||||
ensure_command_available git
|
||||
ensure_command_available git
|
||||
|
||||
if ! [ -d "$BUILDS_DIR" ]; then
|
||||
echo "Downloading OnlyOffice..."
|
||||
git clone --bare https://github.com/cryptpad/onlyoffice-builds.git "$BUILDS_DIR"
|
||||
fi
|
||||
if ! [ -d "$BUILDS_DIR" ]; then
|
||||
echo "Downloading OnlyOffice..."
|
||||
git clone --bare https://github.com/cryptpad/onlyoffice-builds.git "$BUILDS_DIR"
|
||||
fi
|
||||
if [ ${TRUST_REPOSITORY+x} ] || [ "${PROPS[trust_repository]:-no}" == yes ]; then
|
||||
git config --global --add safe.directory /cryptpad/onlyoffice-conf/onlyoffice-builds.git
|
||||
fi
|
||||
}
|
||||
|
||||
install_version() {
|
||||
|
|
|
@ -919,7 +919,10 @@ define([
|
|||
};
|
||||
|
||||
const getMyOOIndex = function() {
|
||||
return findUserByOOId(myOOId).index;
|
||||
const user = findUserByOOId(myOOId);
|
||||
return user
|
||||
? user.index
|
||||
: content.ids.length; // Assign an unused id to read-only users
|
||||
};
|
||||
|
||||
var getParticipants = function () {
|
||||
|
@ -1478,6 +1481,10 @@ define([
|
|||
send({ type: "message" });
|
||||
break;
|
||||
case "saveChanges":
|
||||
if (readOnly) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we have unsaved data before reloading for a checkpoint...
|
||||
if (APP.onStrictSaveChanges) {
|
||||
delete APP.unsavedLocks;
|
||||
|
|
|
@ -1055,7 +1055,7 @@ define([
|
|||
|
||||
var removeClient = function (ctx, cId) {
|
||||
var idx = ctx.clients.indexOf(cId);
|
||||
ctx.clients.splice(idx, 1);
|
||||
if (idx !== -1) { ctx.clients.splice(idx, 1); }
|
||||
|
||||
Object.keys(ctx.calendars).forEach(function (id) {
|
||||
var cal = ctx.calendars[id];
|
||||
|
|
Loading…
Reference in New Issue