hack: Nasty hack for covercard auth

This commit is contained in:
David Arnold 2020-10-20 17:44:04 -05:00 committed by Denis Perov
parent 2265d726ae
commit 2288c8ac15
3 changed files with 8 additions and 2 deletions

View file

@ -7,7 +7,7 @@ template(name="minicard")
.handle
.fa.fa-arrows
if cover
.minicard-cover(style="background-image: url('{{cover.link 'original' '/'}}');")
.minicard-cover(style="background-image: url('{{cover.link 'original' '/'}}?dummyReloadAfterSessionEstablished={{sess}}');")
if labels
.minicard-labels(class="{{#if hiddenMinicardLabelText}}minicard-labels-no-text{{/if}}")
each labels

View file

@ -116,6 +116,12 @@ Template.minicard.helpers({
return false;
}
},
// XXX resolve this nasty hack for https://github.com/veliovgroup/Meteor-Files/issues/763
sess() {
return Meteor.connection && Meteor.connection._lastSessionId
? Meteor.connection._lastSessionId
: null;
},
});
BlazeComponent.extendComponent({

View file

@ -56,7 +56,7 @@ Attachments = new FilesCollection({
if (board.isPublic()) {
return true;
}
return board.hasMember(fileObj.userId);
return board.hasMember(this.userId);
},
});