瀏覽代碼

Merge branch 'wekan:master' into master

TheExo 3 年之前
父節點
當前提交
12c9317e15

+ 1 - 0
.meteor/packages

@@ -149,3 +149,4 @@ pascoual:pdfkit
 wekan-accounts-lockout
 lmieulet:meteor-coverage
 meteortesting:mocha
+browser-policy-content

+ 1 - 0
.meteor/versions

@@ -19,6 +19,7 @@ blaze@2.5.0
 blaze-tools@1.1.2
 boilerplate-generator@1.7.1
 browser-policy-common@1.0.11
+browser-policy-content@1.1.1
 browser-policy-framing@1.1.0
 caching-compiler@1.2.2
 caching-html-compiler@1.2.0

+ 20 - 1
CHANGELOG.md

@@ -1,6 +1,15 @@
 [Mac ChangeLog](https://github.com/wekan/wekan/wiki/Mac)
 
-# Upcoming WeKan ® release
+# v6.17 2022-04-06 WeKan ® release
+
+This release adds the following updates:
+
+- [Updated dependencies](https://github.com/wekan/wekan/commit/f613a5875fbc600292f6821776d957c7221bcd0a).
+  Thanks to xet7.
+
+Thanks to above GitHub users for their contributions and translators for their translations.
+
+# v6.16 2022-04-06 WeKan ® release
 
 This release fixes the following bugs:
 
@@ -8,6 +17,16 @@ This release fixes the following bugs:
   Thanks to helioguardabaxo.
 - [Remove incomplete translated changelogs](https://github.com/wekan/wekan/pull/4455).
   Thanks to ocdtrekkie.
+- [Fix Can't add attachments because of Content-Security-Policy](https://github.com/wekan/wekan/commit/0d9c37b0067d46669b7258bfff5dfc16d590e1d9).
+  Thanks to Ben0it-T and xet7.
+- [Try to fix Duplicate Board](https://github.com/wekan/wekan/commit/e7a11c57338a15a8fc1e1b74a2446ffd7d4743a7).
+  Thanks to xet7.
+- [Try to fix Trello import Attachment and links not defined. In Progress, does not work yet](https://github.com/wekan/wekan/commit/5eca3de00fea31721fa2e10b7d3a6f13ca87f39c).
+  Thanks to akhudushin, hatl, 2447254731 and xet7.
+- [Comment out Trello attachment import until it's implemented with API key](https://github.com/wekan/wekan/commit/49a996624f3842c243bb72120b95c27d914e02a9).
+  Thanks to xet7.
+- [Try to fix Snap WRITABLE_FILES](https://github.com/wekan/wekan/commit/4ca7b0dad733099cd6ad15acc69ec436539f7460).
+  Thanks to xet7.
 
 Thanks to above GitHub users for their contributions and translators for their translations.
 

+ 1 - 1
Stackerfile.yml

@@ -1,5 +1,5 @@
 appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
-appVersion: "v6.15.0"
+appVersion: "v6.17.0"
 files:
   userUploads:
     - README.md

+ 1 - 1
client/components/boards/boardsList.js

@@ -239,7 +239,7 @@ BlazeComponent.extendComponent({
             },
             (err, res) => {
               if (err) {
-                this.setError(err.error);
+                self.setError(err.error);
               } else {
                 Session.set('fromBoard', null);
                 subManager.subscribe('board', res, false);

+ 1 - 1
helm/wekan/Chart.yaml

@@ -1,5 +1,5 @@
 apiVersion: v2
-appVersion: "6.15"
+appVersion: "6.17"
 dependencies:
   - condition: mongodb.enabled
     name: mongodb

+ 1 - 1
helm/wekan/values.yaml

@@ -14,7 +14,7 @@ serviceAccounts:
 ##
 image:
   repository: quay.io/wekan/wekan
-  tag: v6.15
+  tag: v6.17
   pullPolicy: IfNotPresent
 
 ## Configuration for wekan component

+ 3 - 3
i18n/de.i18n.json

@@ -282,7 +282,7 @@
     "computer": "Computer",
     "confirm-subtask-delete-popup": "Wollen Sie die Teilaufgabe wirklich löschen?",
     "confirm-checklist-delete-popup": "Wollen Sie diese Checkliste wirklich löschen?",
-    "subtaskDeletePopup-title": "Delete Subtask?",
+    "subtaskDeletePopup-title": "Teilaufgabe löschen?",
     "checklistDeletePopup-title": "Checkliste löschen?",
     "copy-card-link-to-clipboard": "Kopiere Link zur Karte in die Zwischenablage",
     "copy-text-to-clipboard": "Text in die Zwischenablage kopieren",
@@ -706,7 +706,7 @@
     "deposit-subtasks-board": "Teilaufgaben in diesem Board ablegen:",
     "deposit-subtasks-list": "Zielliste für hier abgelegte Teilaufgaben:",
     "show-parent-in-minicard": "Übergeordnetes Element auf Minikarte anzeigen:",
-    "description-on-minicard": "Description on minicard",
+    "description-on-minicard": "Beschreibung auf Minikarte",
     "prefix-with-full-path": "Vollständiger Pfad über Titel",
     "prefix-with-parent": "Über Titel",
     "subtext-with-full-path": "Vollständiger Pfad unter Titel",
@@ -1150,5 +1150,5 @@
     "copyChecklist": "Checkliste kopieren",
     "copyChecklistPopup-title": "Checkliste kopieren",
     "card-show-lists": "Listen anzeigen",
-    "subtaskActionsPopup-title": "Subtask Actions"
+    "subtaskActionsPopup-title": "Teilaufgabenaktionen"
 }

+ 2 - 2
i18n/fr.i18n.json

@@ -706,7 +706,7 @@
     "deposit-subtasks-board": "Déposer des sous-tâches dans ce tableau :",
     "deposit-subtasks-list": "Liste de destination pour les sous-tâches déposées ici :",
     "show-parent-in-minicard": "Voir la carte parente dans la mini-carte :",
-    "description-on-minicard": "Description on minicard",
+    "description-on-minicard": "Description sur la mini-carte",
     "prefix-with-full-path": "Préfixer avec le chemin complet",
     "prefix-with-parent": "Préfixer avec le parent",
     "subtext-with-full-path": "Sous-titre avec le chemin complet",
@@ -878,7 +878,7 @@
     "delete-team-confirm-popup": "Êtes-vous sûr de vouloir supprimer cette équipe ? Cela est irréversible.",
     "delete-org-confirm-popup": "Êtes-vous sûr de vouloir supprimer cette organisation ? Cela est irréversible.",
     "accounts-allowUserDelete": "Autoriser les utilisateurs à supprimer leur compte",
-    "hide-minicard-label-text": "Cacher l'étiquette de la minicarte",
+    "hide-minicard-label-text": "Cacher l'étiquette de la mini-carte",
     "show-desktop-drag-handles": "Voir les poignées de déplacement du bureau",
     "assignee": "Personne assignée",
     "cardAssigneesPopup-title": "Personne assignée",

+ 3 - 1
models/cards.js

@@ -4,6 +4,8 @@ import {
   TYPE_LINKED_BOARD,
   TYPE_LINKED_CARD,
 } from '../config/const';
+import Attachments from "./attachments";
+
 
 Cards = new Mongo.Collection('cards');
 
@@ -585,8 +587,8 @@ Cards.helpers({
     // Copy attachments
     oldCard.attachments().forEach(att => {
       att.cardId = _id;
-      Attachments.insert(att);
       delete att._id;
+      return Attachments.insert(att);
     });
 
     // copy checklists

+ 24 - 18
models/trelloCreator.js

@@ -1,3 +1,5 @@
+import Attachments from "./attachments";
+
 const DateString = Match.Where(function(dateAsString) {
   check(dateAsString, String);
   return moment(dateAsString, moment.ISO_8601).isValid();
@@ -445,27 +447,31 @@ export class TrelloCreator {
               });
             }
           };
-          if (att.url) {
-            Attachment.load(att.url, opts, cb, true);
-          } else if (att.file) {
-            Attachment.write(att.file, opts, cb, true);
-          }
+          // TODO: Add import attachment with Trello API key
+          //       like Python code at wekan/trello/ of https://github.com/wekan/wekan
+          //if (att.url) {
+          //  Attachment.load(att.url, opts, cb, true);
+          //} else if (att.file) {
+          //  Attachment.write(att.file, opts, cb, true);
+          //}
         });
 
-        if (links.length) {
-          let desc = cardToCreate.description.trim();
-          if (desc) {
-            desc += '\n\n';
+        if (links) {
+          if (links.length) {
+            let desc = cardToCreate.description.trim();
+            if (desc) {
+              desc += '\n\n';
+            }
+            desc += `## ${TAPi18n.__('links-heading')}\n`;
+            links.forEach(link => {
+              desc += `* ${link}\n`;
+            });
+            Cards.direct.update(cardId, {
+              $set: {
+                description: desc,
+              },
+            });
           }
-          desc += `## ${TAPi18n.__('links-heading')}\n`;
-          links.forEach(link => {
-            desc += `* ${link}\n`;
-          });
-          Cards.direct.update(cardId, {
-            $set: {
-              description: desc,
-            },
-          });
         }
       }
       result.push(cardId);

+ 4 - 4
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "wekan",
-  "version": "v6.15.0",
+  "version": "v6.17.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -194,9 +194,9 @@
       "integrity": "sha512-dcNwU1O4sx57ClvLBVFbEgx0UZWfd0JQX5X6fxFRCLHelFBGXFfSz6Y0FAq2PEwUqlqLkdVjVr4VASEOuUnLJw=="
     },
     "@babel/runtime": {
-      "version": "7.16.3",
-      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz",
-      "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==",
+      "version": "7.17.9",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.9.tgz",
+      "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==",
       "requires": {
         "regenerator-runtime": "^0.13.4"
       }

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "wekan",
-  "version": "v6.15.0",
+  "version": "v6.17.0",
   "description": "Open-Source kanban",
   "private": true,
   "repository": {
@@ -21,7 +21,7 @@
   },
   "dependencies": {
     "@babel/core": "^7.15.0",
-    "@babel/runtime": "^7.15.3",
+    "@babel/runtime": "^7.17.9",
     "@wekanteam/markdown-it-mermaid": "^0.5.3",
     "ajv": "^8.10.0",
     "babel-runtime": "^6.26.0",

+ 3 - 3
public/api/wekan.html

@@ -7,7 +7,7 @@
     <meta charset="utf-8">
     <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <title>Wekan REST API v6.15</title>
+    <title>Wekan REST API v6.17</title>
 
     <style>
     </style>
@@ -1558,7 +1558,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
 	  	<ul class="toc-list-h1">
         
           <li>
-            <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v6.15">Wekan REST API v6.15</a>
+            <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v6.17">Wekan REST API v6.17</a>
             
           </li>
         
@@ -2156,7 +2156,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
     <div class="page-wrapper">
       <div class="dark-box"></div>
       <div class="content">
-        <h1 id="wekan-rest-api">Wekan REST API v6.15</h1>
+        <h1 id="wekan-rest-api">Wekan REST API v6.17</h1>
 <blockquote>
 <p>Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.</p>
 </blockquote>

+ 1 - 1
public/api/wekan.yml

@@ -1,7 +1,7 @@
 swagger: '2.0'
 info:
   title: Wekan REST API
-  version: v6.15
+  version: v6.17
   description: |
     The REST API allows you to control and extend Wekan with ease.
 

+ 2 - 2
sandstorm-pkgdef.capnp

@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
     appTitle = (defaultText = "Wekan"),
     # The name of the app as it is displayed to the user.
 
-    appVersion = 615,
+    appVersion = 617,
     # Increment this for every release.
 
-    appMarketingVersion = (defaultText = "6.15.0~2022-04-05"),
+    appMarketingVersion = (defaultText = "6.17.0~2022-04-06"),
     # Human-readable presentation of the app version.
 
     minUpgradableAppVersion = 0,

+ 7 - 0
server/policy.js

@@ -1,6 +1,13 @@
 import { BrowserPolicy } from 'meteor/browser-policy-common';
 
 Meteor.startup(() => {
+
+  // Default allowed
+  BrowserPolicy.content.allowInlineScripts();
+  BrowserPolicy.content.allowEval();
+  BrowserPolicy.content.allowInlineStyles();
+  BrowserPolicy.content.allowSameOriginForAll();
+
   if (process.env.BROWSER_POLICY_ENABLED === 'true') {
     // Trusted URL that can embed Wekan in iFrame.
     const trusted = process.env.TRUSTED_URL;

文件差異過大導致無法顯示
+ 0 - 0
snap-src/bin/config


+ 0 - 6
snap-src/bin/mongodb-control

@@ -24,12 +24,6 @@ if test -f "$SNAP_COMMON/mongodb.log"; then
    rm -f "$SNAP_COMMON/mongodb.log"
 fi
 
-# If uploads directory does not exist, create it.
-# Wekan will store attachments there.
-if [ ! -d "${WRITABLE_PATH}" ]; then
-   mkdir "${WRITABLE_PATH}"
-fi
-
 # Alternative: When starting MongoDB, and using logfile, truncate log to last 1000 lines of text.
 # 1) If file exists:
 #if test -f "$SNAP_COMMON/mongodb.log"; then

+ 7 - 0
snap-src/bin/wekan-control

@@ -16,6 +16,13 @@ else
     export MONGO_URL="mongodb://$MONGODB_BIND_IP:$MONGODB_PORT/wekan"
 fi
 
+# If uploads directory does not exist, create it.
+# Wekan will store attachments there.
+export WRITABLE_PATH=$SNAP_COMMON/files
+if [ ! -d $WRITABLE_PATH ]; then
+  mkdir $WRITABLE_PATH
+fi
+
 echo -e "MONGO_URL=$MONGO_URL"
 APPLICATION_DIRECTORY=$SNAP
 APPLICATION_START=main.js

+ 6 - 6
snap-src/bin/wekan-help

@@ -15,12 +15,12 @@ echo -e "\t$ snap set $SNAP_NAME debug='true'"
 echo -e "\t-Disable the Debug of Wekan:"
 echo -e "\t$ snap unset $SNAP_NAME debug"
 echo -e "\n"
-echo -e "Writable path. Snap can not write outside of /var/snap/wekan/common sandbox directory."
-echo -e "Default:"
-echo -e "\t$ snap set $SNAP_NAME writable-path='\$SNAP_COMMON\uploads'"
-echo -e "\t-To set different path, usually not needed:"
-echo -e "\t$ snap set $SNAP_NAME writable-path='\$SNAP_COMMON\uploads2'"
-echo -e "\n"
+#echo -e "Writable path. Snap can not write outside of /var/snap/wekan/common sandbox directory."
+#echo -e "Default:"
+#echo -e "\t$ snap set $SNAP_NAME writable-path='\$SNAP_COMMON\files'"
+#echo -e "\t-To set different path, usually not needed:"
+#echo -e "\t$ snap set $SNAP_NAME writable-path='\$SNAP_COMMON\files2'"
+#echo -e "\n"
 echo -e "Mongo log destimation: devnull/snapcommon/syslog. Default: 'devnull'"
 echo -e "To set different mongo log destination of Wekan:"
 echo -e "\t$ snap set $SNAP_NAME mongo-log-destination='snapcommon'"

+ 1 - 1
snapcraft.yaml

@@ -1,5 +1,5 @@
 name: wekan
-version: '6.15'
+version: '6.17'
 summary: Open Source kanban
 description: |
    WeKan ® is an Open Source and collaborative kanban board application.

部分文件因文件數量過多而無法顯示