Ver código fonte

Merge branch 'devel'

Lauri Ojansivu 6 anos atrás
pai
commit
365e2e5b4b

+ 3 - 3
.meteor/packages

@@ -49,7 +49,6 @@ kadira:dochead
 meteorhacks:picker
 meteorhacks:subs-manager
 mquandalle:autofocus
-mquandalle:moment
 ongoworks:speakingurl
 raix:handlebar-helpers
 tap:i18n
@@ -81,8 +80,9 @@ staringatlights:fast-render
 mixmax:smart-disconnect
 accounts-password@1.5.0
 cfs:gridfs
-browser-policy
 eluck:accounts-lockout
 rzymek:fullcalendar
 momentjs:moment@2.22.2
-atoy40:accounts-cas
+atoy40:accounts-cas
+browser-policy-framing
+mquandalle:moment

+ 0 - 2
.meteor/versions

@@ -19,9 +19,7 @@ binary-heap@1.0.10
 blaze@2.3.2
 blaze-tools@1.0.10
 boilerplate-generator@1.3.1
-browser-policy@1.1.0
 browser-policy-common@1.0.11
-browser-policy-content@1.1.0
 browser-policy-framing@1.1.0
 caching-compiler@1.1.9
 caching-html-compiler@1.1.2

+ 15 - 0
CHANGELOG.md

@@ -1,3 +1,18 @@
+# v1.32 2018-08-16 Wekan release
+
+This release fixes the following bugs:
+
+- [Content Policy: Allow inline scripts, otherwise there is errors in browser/inspect/console](https://github.com/wekan/wekan/commit/807c6ce09e4b5d49049d343d73bbca24fa84d527);
+- [Use only framing policy, not all of content policy](https://github.com/wekan/wekan/commit/b3005f828dbf69bdf174d4bcd7654310fa9e0968);
+- [Set default matomo settings to disabled](https://github.com/wekan/wekan/commit/807c6ce09e4b5d49049d343d73bbca24fa84d527);
+- Fix [hidden](https://github.com/wekan/wekan/commit/be00465e67931f2a5655ed47f6e075ed1c589f54)
+  [system](https://github.com/wekan/wekan/commit/9fc3de8502919f9aeb18c9f8ea3b0678b66ce176) [messages](https://github.com/wekan/wekan/issues/1830);
+- Fix [Requested By](https://github.com/wekan/wekan/commit/e55d7e4f72a4b425c4aca5ba04a7be1fc642649b) and
+  [Assigned By](https://github.com/wekan/wekan/commit/5c33a8534186920be642be8e2ac17743a54f16db) [fields](https://github.com/wekan/wekan/issues/1830);
+- [Fix Date and Time Formats are only US in every language](https://github.com/wekan/wekan/commit/b3005f828dbf69bdf174d4bcd7654310fa9e0968).
+
+Thanks to GitHub users andresmanelli and xet7 for their contributions.
+
 # v1.31 2018-08-14 Wekan release
 
 This release fixes the following bugs:

+ 2 - 2
Dockerfile

@@ -33,8 +33,8 @@ ENV BUILD_DEPS="apt-utils gnupg gosu wget curl bzip2 build-essential python git
     WITH_API=true \
     MATOMO_ADDRESS="" \
     MATOMO_SITE_ID="" \
-    MATOMO_DO_NOT_TRACK=false \
-    MATOMO_WITH_USERNAME=true \
+    MATOMO_DO_NOT_TRACK=true \
+    MATOMO_WITH_USERNAME=false \
     BROWSER_POLICY_ENABLED=true \
     TRUSTED_URL=""
 

+ 1 - 1
app.json

@@ -1,6 +1,6 @@
 {
   "name": "Wekan",
-  "description": "The open-source Trello-like kanban",
+  "description": "The open-source kanban",
   "repository": "https://github.com/wekan/wekan",
   "logo": "https://raw.githubusercontent.com/wekan/wekan/master/meta/icons/wekan-150.png",
   "keywords": ["productivity", "tool", "team", "kanban"],

+ 12 - 4
client/components/activities/activities.js

@@ -8,16 +8,24 @@ BlazeComponent.extendComponent({
     const sidebar = this.parentComponent(); // XXX for some reason not working
     sidebar.callFirstWith(null, 'resetNextPeak');
     this.autorun(() => {
-      const mode = this.data().mode;
+      let mode = this.data().mode;
       const capitalizedMode = Utils.capitalize(mode);
-      const id = Session.get(`current${capitalizedMode}`);
+      let thisId, searchId;
+      if (mode === 'linkedcard' || mode === 'linkedboard') {
+        thisId = Session.get('currentCard');
+        searchId = Cards.findOne({_id: thisId}).linkedId;
+        mode = mode.replace('linked', '');
+      } else {
+        thisId = Session.get(`current${capitalizedMode}`);
+        searchId = thisId;
+      }
       const limit = this.page.get() * activitiesPerPage;
       const user = Meteor.user();
       const hideSystem = user ? user.hasHiddenSystemMessages() : false;
-      if (id === null)
+      if (searchId === null)
         return;
 
-      this.subscribe('activities', mode, id, limit, hideSystem, () => {
+      this.subscribe('activities', mode, searchId, limit, hideSystem, () => {
         this.loadNextPageLocked = false;
 
         // If the sibear peak hasn't increased, that mean that there are no more

+ 16 - 11
client/components/cards/cardDetails.jade

@@ -129,14 +129,14 @@ template(name="cardDetails")
             +editCardRequesterForm
           else
             a.js-open-inlined-form
-              if requestedBy
+              if getRequestedBy
                 +viewer
-                  = requestedBy
+                  = getRequestedBy
               else
                 | {{_ 'add'}}
-        else if requestedBy
+        else if getRequestedBy
           +viewer
-            = requestedBy
+            = getRequestedBy
 
       .card-details-item.card-details-item-name
         h3.card-details-item-title {{_ 'assigned-by'}}
@@ -145,14 +145,14 @@ template(name="cardDetails")
             +editCardAssignerForm
           else
             a.js-open-inlined-form
-              if assignedBy
+              if getAssignedBy
                 +viewer
-                  = assignedBy
+                  = getAssignedBy
               else
                 | {{_ 'add'}}
-        else if requestedBy
+        else if getRequestedBy
           +viewer
-            = assignedBy
+            = getAssignedBy
 
     hr
     +checklists(cardId = _id)
@@ -182,7 +182,12 @@ template(name="cardDetails")
     if currentUser.isBoardMember
       +commentForm
     if isLoaded.get
-      +activities(card=this mode="card")
+      if isLinkedCard
+        +activities(card=this mode="linkedcard")
+      else if isLinkedBoard
+        +activities(card=this mode="linkedboard")
+      else
+        +activities(card=this mode="card")
 
 template(name="editCardTitleForm")
   textarea.js-edit-card-title(rows='1' autofocus)
@@ -192,13 +197,13 @@ template(name="editCardTitleForm")
     a.fa.fa-times-thin.js-close-inlined-form
 
 template(name="editCardRequesterForm")
-  input.js-edit-card-requester(type='text' autofocus value=requestedBy)
+  input.js-edit-card-requester(type='text' autofocus value=getRequestedBy)
   .edit-controls.clearfix
     button.primary.confirm.js-submit-edit-card-requester-form(type="submit") {{_ 'save'}}
     a.fa.fa-times-thin.js-close-inlined-form
 
 template(name="editCardAssignerForm")
-  input.js-edit-card-assigner(type='text' autofocus value=assignedBy)
+  input.js-edit-card-assigner(type='text' autofocus value=getAssignedBy)
   .edit-controls.clearfix
     button.primary.confirm.js-submit-edit-card-assigner-form(type="submit") {{_ 'save'}}
     a.fa.fa-times-thin.js-close-inlined-form

+ 11 - 6
docker-compose.yml

@@ -33,6 +33,7 @@ services:
         - METEOR_EDGE=${METEOR_EDGE}
         - USE_EDGE=${USE_EDGE}
     ports:
+      # Docker outsideport:insideport
       - 80:8080
     environment:
       - MONGO_URL=mongodb://wekandb:27017/wekan
@@ -41,14 +42,18 @@ services:
       # If you disable Wekan API with 'false', Export Board does not work.
       - WITH_API=true
       # Optional: Integration with Matomo https://matomo.org that is installed to your server
-      # The address of the server where Matomo is hosted:
-      # - MATOMO_ADDRESS=https://example.com/matomo
+      # The address of the server where Matomo is hosted. 
+      # example: - MATOMO_ADDRESS=https://example.com/matomo
+      - MATOMO_ADDRESS=''
       # The value of the site ID given in Matomo server for Wekan
-      # - MATOMO_SITE_ID=123456789
-      # The option do not track which enables users to not be tracked by matomo"
-      # - MATOMO_DO_NOT_TRACK=false
+      # example: - MATOMO_SITE_ID=12345
+      - MATOMO_SITE_ID=''
+      # The option do not track which enables users to not be tracked by matomo
+      # example:  - MATOMO_DO_NOT_TRACK=false
+      - MATOMO_DO_NOT_TRACK=true
       # The option that allows matomo to retrieve the username:
-      # - MATOMO_WITH_USERNAME=true
+      # example: MATOMO_WITH_USERNAME=true
+      - MATOMO_WITH_USERNAME=false
       # Enable browser policy and allow one trusted URL that can have iframe that has Wekan embedded inside.
       # Setting this to false is not recommended, it also disables all other browser policy protections
       # and allows all iframing etc. See wekan/server/policy.js

+ 46 - 1
models/cards.js

@@ -88,7 +88,6 @@ Cards.attachSchema(new SimpleSchema({
     type: String,
     optional: true,
     defaultValue: '',
-
   },
   assignedBy: {
     type: String,
@@ -769,6 +768,52 @@ Cards.helpers({
       return this.archived;
     }
   },
+
+  setRequestedBy(requestedBy) {
+    if (this.isLinkedCard()) {
+      return Cards.update(
+        { _id: this.linkedId },
+        {$set: {requestedBy}}
+      );
+    } else {
+      return Cards.update(
+        {_id: this._id},
+        {$set: {requestedBy}}
+      );
+    }
+  },
+
+  getRequestedBy() {
+    if (this.isLinkedCard()) {
+      const card = Cards.findOne({ _id: this.linkedId });
+      return card.requestedBy;
+    } else  {
+      return this.requestedBy;
+    }
+  },
+
+  setAssignedBy(assignedBy) {
+    if (this.isLinkedCard()) {
+      return Cards.update(
+        { _id: this.linkedId },
+        {$set: {assignedBy}}
+      );
+    } else {
+      return Cards.update(
+        {_id: this._id},
+        {$set: {assignedBy}}
+      );
+    }
+  },
+
+  getAssignedBy() {
+    if (this.isLinkedCard()) {
+      const card = Cards.findOne({ _id: this.linkedId });
+      return card.assignedBy;
+    } else  {
+      return this.assignedBy;
+    }
+  },
 });
 
 Cards.mutations({

+ 2 - 2
package.json

@@ -1,7 +1,7 @@
 {
   "name": "wekan",
-  "version": "1.31.0",
-  "description": "The open-source Trello-like kanban",
+  "version": "1.32.0",
+  "description": "The open-source kanban",
   "private": true,
   "scripts": {
     "lint": "eslint --ignore-pattern 'packages/*' .",

+ 4 - 4
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 = 116,
+    appVersion = 117,
     # Increment this for every release.
 
-    appMarketingVersion = (defaultText = "1.31.0~2018-08-14"),
+    appMarketingVersion = (defaultText = "1.32.0~2018-08-16"),
     # Human-readable presentation of the app version.
 
     minUpgradableAppVersion = 0,
@@ -240,8 +240,8 @@ const myCommand :Spk.Manifest.Command = (
     (key = "WITH_API", value = "true"),
     (key = "MATOMO_ADDRESS", value=""),
     (key = "MATOMO_SITE_ID", value=""),
-    (key = "MATOMO_DO_NOT_TRACK", value="false"),
-    (key = "MATOMO_WITH_USERNAME", value="true"),
+    (key = "MATOMO_DO_NOT_TRACK", value="true"),
+    (key = "MATOMO_WITH_USERNAME", value="false"),
     (key = "BROWSER_POLICY_ENABLED", value="true"),
     (key = "TRUSTED_URL", value=""),
     (key = "SANDSTORM", value = "1"),

+ 2 - 2
scalingo.json

@@ -1,8 +1,8 @@
 {
   "name": "wekan",
-  "description": "The open-source Trello-like kanban (build with Meteor)",
+  "description": "The open-source kanban (built with Meteor)",
   "repository": "https://github.com/wekan/wekan/",
   "logo": "https://raw.githubusercontent.com/wekan/wekan/master/meta/icons/wekan-150.png",
-  "website": "https://wekan.io",
+  "website": "https://wekan.github.io",
   "addons": ["scalingo-mongodb"]
 }

+ 10 - 9
server/policy.js

@@ -6,28 +6,29 @@ Meteor.startup(() => {
     // Trusted URL that can embed Wekan in iFrame.
     const trusted = process.env.TRUSTED_URL;
     BrowserPolicy.framing.disallow();
-    BrowserPolicy.content.disallowInlineScripts();
-    BrowserPolicy.content.disallowEval();
-    BrowserPolicy.content.allowInlineStyles();
-    BrowserPolicy.content.allowFontDataUrl();
+    //Allow inline scripts, otherwise there is errors in browser/inspect/console
+    //BrowserPolicy.content.disallowInlineScripts();
+    //BrowserPolicy.content.disallowEval();
+    //BrowserPolicy.content.allowInlineStyles();
+    //BrowserPolicy.content.allowFontDataUrl();
     BrowserPolicy.framing.restrictToOrigin(trusted);
-    BrowserPolicy.content.allowScriptOrigin(trusted);
+    //BrowserPolicy.content.allowScriptOrigin(trusted);
   }
   else {
     // Disable browser policy and allow all framing and including.
     // Use only at internal LAN, not at Internet.
     BrowserPolicy.framing.allowAll();
-    BrowserPolicy.content.allowDataUrlForAll();
+    //BrowserPolicy.content.allowDataUrlForAll();
   }
 
   // Allow all images from anywhere
-  BrowserPolicy.content.allowImageOrigin('*');
+  //BrowserPolicy.content.allowImageOrigin('*');
 
   // If Matomo URL is set, allow it.
   const matomoUrl = process.env.MATOMO_ADDRESS;
   if (matomoUrl){
-    BrowserPolicy.content.allowScriptOrigin(matomoUrl);
-    BrowserPolicy.content.allowImageOrigin(matomoUrl);
+    //BrowserPolicy.content.allowScriptOrigin(matomoUrl);
+    //BrowserPolicy.content.allowImageOrigin(matomoUrl);
   }
 
 });

+ 0 - 2
server/publications/boards.js

@@ -103,14 +103,12 @@ Meteor.publishRelations('board', function(boardId) {
         const impCardId = card.linkedId;
         this.cursor(Cards.find({ _id: impCardId }));
         this.cursor(CardComments.find({ cardId: impCardId }));
-        this.cursor(Activities.find({ cardId: impCardId }));
         this.cursor(Attachments.find({ cardId: impCardId }));
         this.cursor(Checklists.find({ cardId: impCardId }));
         this.cursor(ChecklistItems.find({ cardId: impCardId }));
       } else if (card.type === 'cardType-linkedBoard') {
         this.cursor(Boards.find({ _id: card.linkedId}));
       }
-      this.cursor(Activities.find({ cardId }));
       this.cursor(CardComments.find({ cardId }));
       this.cursor(Attachments.find({ cardId }));
       this.cursor(Checklists.find({ cardId }));

+ 1 - 1
snap-src/bin/config

@@ -61,7 +61,7 @@ DEFAULT_MATOMO_SITE_ID=""
 KEY_MATOMO_SITE_ID="matomo-site-id"
 
 DESCRIPTION_MATOMO_DO_NOT_TRACK="The option do not track which enables users to not be tracked by matomo"
-DEFAULT_MATOMO_DO_NOT_TRACK="false"
+DEFAULT_MATOMO_DO_NOT_TRACK="true"
 KEY_MATOMO_DO_NOT_TRACK="matomo-do-not-track"
 
 DESCRIPTION_MATOMO_WITH_USERNAME="The option that allows matomo to retrieve the username"

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

@@ -7,7 +7,7 @@ if [ "$CADDY_ENABLED" = "true" ]; then
     export PORT=${CADDY_PORT} &>/dev/null
 fi
 
-echo -e "Wekan: The open-source Trello-like kanban.\n"
+echo -e "Wekan: The open-source kanban.\n"
 echo -e "Make sure you have connected all interfaces, check more by calling $ snap interfaces ${SNAP_NAME}"
 echo -e "\n"
 echo -e "${SNAP_NAME} has multiple services, to check status use systemctl"

+ 1 - 1
snapcraft.yaml

@@ -1,7 +1,7 @@
 name: wekan
 version: 0
 version-script: git describe --dirty --tags |  cut -c 2-
-summary: The open-source Trello-like kanban
+summary: The open-source kanban
 description: |
    Wekan is an open-source and collaborative kanban board application.