diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-12-08 16:18:44 -0500 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2016-01-31 20:03:12 +0100 |
commit | a13fad749e8a75025bb13de87f0170e1ea9e462d (patch) | |
tree | 81ef2f15cb540dfdd7efb81571e213d995f7b666 /models | |
parent | 67e7b6a139280cab1e1bccb94c684c56eb69985c (diff) | |
download | wekan-a13fad749e8a75025bb13de87f0170e1ea9e462d.tar.gz wekan-a13fad749e8a75025bb13de87f0170e1ea9e462d.tar.bz2 wekan-a13fad749e8a75025bb13de87f0170e1ea9e462d.zip |
Change the board import layout from a popup to a full page
This commit also removes the “import a single Trello card” as we couldn’t figure
out some reasonable use case.
We also create a new publication on the server to provide the minimal user
profile informations required to display an avatar.
Diffstat (limited to 'models')
-rw-r--r-- | models/import.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/models/import.js b/models/import.js index 4be1273c..fecc5c4d 100644 --- a/models/import.js +++ b/models/import.js @@ -470,42 +470,4 @@ Meteor.methods({ // XXX add members return boardId; }, - - importTrelloCard(trelloCard, data) { - const trelloCreator = new TrelloCreator(data); - - // 1. check parameters are ok from a syntax point of view - try { - check(data, { - listId: String, - sortIndex: Number, - membersMapping: Match.Optional(Object), - }); - trelloCreator.checkCards([trelloCard]); - trelloCreator.checkLabels(trelloCard.labels); - trelloCreator.checkActions(trelloCard.actions); - } catch(e) { - throw new Meteor.Error('error-json-schema'); - } - - // 2. check parameters are ok from a business point of view (exist & - // authorized) - const list = Lists.findOne(data.listId); - if (!list) { - throw new Meteor.Error('error-list-doesNotExist'); - } - if (Meteor.isServer) { - if (!allowIsBoardMember(Meteor.userId(), Boards.findOne(list.boardId))) { - throw new Meteor.Error('error-board-notAMember'); - } - } - - // 3. create all elements - trelloCreator.lists[trelloCard.idList] = data.listId; - trelloCreator.parseActions(trelloCard.actions); - const board = list.board(); - trelloCreator.createLabels(trelloCard.labels, board); - const cardIds = trelloCreator.createCards([trelloCard], board._id); - return cardIds[0]; - }, }); |