summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/components/boards/boardsList.js6
-rw-r--r--models/boards.js8
2 files changed, 8 insertions, 6 deletions
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index eee119ea..145f6789 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -25,10 +25,6 @@ BlazeComponent.extendComponent({
},
onRendered() {
- function userIsAllowedToMove() {
- return Meteor.user();
- }
-
const itemsSelector = '.js-board:not(.placeholder)';
const $boards = this.$('.js-boards');
@@ -77,8 +73,6 @@ BlazeComponent.extendComponent({
handle: '.board-handle',
});
}
-
- $boards.sortable('option', 'disabled', !userIsAllowedToMove());
});
},
diff --git a/models/boards.js b/models/boards.js
index 11d8fd89..f272e097 100644
--- a/models/boards.js
+++ b/models/boards.js
@@ -1219,6 +1219,14 @@ if (Meteor.isServer) {
fetch: ['members'],
});
+ // All logged in users are allowed to reorder boards by dragging at All Boards page and Public Boards page.
+ Boards.allow({
+ update(userId, board, fieldNames) {
+ return _.contains(fieldNames, 'sort');
+ },
+ fetch: [],
+ });
+
// The number of users that have starred this board is managed by trusted code
// and the user is not allowed to update it
Boards.deny({