From 2302385cce79b7407d73acccd190f77e55370f04 Mon Sep 17 00:00:00 2001 From: Rajat Jain Date: Tue, 2 Jul 2019 18:03:45 +0530 Subject: Don't let logged out user do manual order Add a check for logged out user in the manual order so that they don't see an flash message when they try to reorder issues. --- app/assets/javascripts/manual_ordering.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/assets/javascripts/manual_ordering.js b/app/assets/javascripts/manual_ordering.js index e16ddbfef7e..012d1e70410 100644 --- a/app/assets/javascripts/manual_ordering.js +++ b/app/assets/javascripts/manual_ordering.js @@ -21,7 +21,7 @@ const updateIssue = (url, issueList, { move_before_id, move_after_id }) => const initManualOrdering = () => { const issueList = document.querySelector('.manual-ordering'); - if (!issueList || !(gon.features && gon.features.manualSorting)) { + if (!issueList || !(gon.features && gon.features.manualSorting) || !(gon.current_user_id > 0)) { return; } -- cgit v1.2.1