Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback permissions #1804

Merged
merged 4 commits into from
Oct 25, 2016
Merged

Feedback permissions #1804

merged 4 commits into from
Oct 25, 2016

Conversation

jykae
Copy link
Contributor

@jykae jykae commented Oct 24, 2016

Closes #1744
Closes #1170

  • template permission check
  • DB allow rules for update/remove feedback

},
});

Template.singleFeedback.events({
'click .up-vote': function (event, template) {
'click .up-vote': () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I observed You corrected code which is associated with vote system. I went ahead and merged yours two branch for feedback fixing. Arrow function broken all vote system. Please come back to previous code version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marla-singer can you provide more info or screenshot, how does it break? voting was broken and part of other PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jykae Meteor console error Exception while invoking method 'submitVote' Error: Feedback id is required.
How to reproduce:

  1. git checkout bugfix/feedback-voting
  2. Repeat these changes for feedback/client/single/single.js
  3. Go to any api, open Feedback tab and try to vote

Possible solution: doesn't use an arrow function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marla-singer ah, it's because arrow function does not work same way with "this", line 80. https://rainsoft.io/when-not-to-use-arrow-functions-in-javascript/

@@ -61,7 +85,7 @@ Template.singleFeedback.events({
// Submit upvote (+1) for current feedback
Meteor.call('submitVote', feedbackId, 1);
},
'click .down-vote': function (event, template) {
'click .down-vote': () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please come back to previous code version.

@jykae
Copy link
Contributor Author

jykae commented Oct 25, 2016

@marla-singer changed arrow functions back to previous.

@marla-singer
Copy link
Contributor

@jykae Merge it

@marla-singer marla-singer merged commit 41cff0f into develop Oct 25, 2016
@marla-singer marla-singer deleted the bugfix/feedback-permissions branch October 25, 2016 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants