I tried to "Edit" a page and after clicking Yes on the alert. I was redirected to home with /return_to=login and alert generated

Looks like there is something wrong with the conditions.
@SidharthBansal return_to is conflicting in this case.
Please tell the steps which you have followed so that we can work upon this.
Go to any research page and try to edit it as moderator. You will get redirected to "login" page. And, when a user try to access login page with session then alert is shown like "You have to logout to access this page". That alert is shown.
This error is not related to any login or sign up modals first of all.
Can you please hard refresh and try this again?

I will see the code.
This bug hit my radar today because I asked if anyone could fix that bad link (404) to https://publiclab/chat at https://publiclab.org/notes/warren/02-28-2019/call-for-summer-of-code-2019-proposals
Actually, the alert shows that only admins, moderators, and co-authors can edit the page as a privilege but after going through Git blame- https://github.com/publiclab/plots2/blame/770b661d1c9b740693ff1e118cfcd56416cffa9b/app/controllers/notes_controller.rb, it looks like moderators were never given the privilege to edit the research note.
So, it's a question for @jywarren @publiclab/community-reps that whether editing rights to a research note/question should be extended to moderators or not? If not, then, we should edit the alert.
Thanks!
I think we had better keep it to admins only; thank you @gaurav! So yes,
let's change the message.
On Sun, Mar 10, 2019 at 2:40 PM Gaurav Sachdeva notifications@github.com
wrote:
Actually, the alert shows that only admins, moderators, and co-authors can
edit the page as a privilege but after going through Git blame-
https://github.com/publiclab/plots2/blame/770b661d1c9b740693ff1e118cfcd56416cffa9b/app/controllers/notes_controller.rb,
it looks like moderators were never given the privilege to edit the
research note.So, it's a question for @jywarren https://github.com/jywarren
@publiclab/community-reps
https://github.com/orgs/publiclab/teams/community-reps that whether
editing rights to a research note/question should be extended to moderators
or not? If not, then, we should edit the alert.Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/4329#issuecomment-471331960,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJ2vIH7wwOpldPndB25t8v9tWSPwYks5vVVGZgaJpZM4ZW3Mt
.
@jywarren sounds good. Do what a separate issue to fix the 404 (the link to https://publiclab/chat )?
Ok, then making a FTO for fixing the alert. @jywarren actually, many pages show - https://publiclab/chat :see_no_evil:
I just created 2 FTO issues for fixing this - one for alert https://github.com/publiclab/plots2/issues/5046 and one for hiding edit button to moderator - https://github.com/publiclab/plots2/issues/5047.
So, closing this one. Thanks @jywarren @pdurbin!