User must be logged in to access edit routes
Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.
If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!
We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you 💝
If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!
🤔 What you will need to know.
Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.
📋 Step by Step
-
[ ] 🙋 Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!
-
[ ] 📝 Update the file app/controllers/users_controller.rb in the
plots2repository (press the little pen Icon) and edit the line as shown below.
See this page for some help in taking your first steps!
Below is a "diff" showing in red (and a -) which lines to remove, and in green (and a +) which lines to add:
@@ -1,6 +1,6 @@
class UsersController < ApplicationController
before_filter :require_no_user, :only => [:new]
- before_filter :require_user, :only => [:update]
+ before_filter :require_user, :only => [:edit, :update]
before_action :set_user, only: [:info, :followed, :following, :followers]
def new
-
[ ] 💾 Commit your changes
-
[ ] 🔀 Start a Pull Request. There are two ways how you can start a pull request:
-
If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.
-
You can also edit files directly in your browser and open a pull request from there.
- [ ] 🏁 Done Ask in comments for a review :)
🤔❓ Questions?
Leave a comment below!
Is someone else already working on this?
We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. If someone seem stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!
(This issue was created by First-Timers-Bot.)
Since I've never contributed to any open source ever before, thus am a complete newbie, I'd like to take on this task. When I clicked the hyperlink to the file app/controllers/users_controller.rb the resulting page said "404, this is not the webpage you are looking for". How do I get to the plots2 repository?
Hi @rob4abcba ! Thanks for pointing out this , I have updated the link .
Yes , it would be great if you could send the PR for this issue 😄 . Ping @publiclab/reviewers team if you get stuck anywhere :) . Thanks !
PR = Pull Request? I have to first learn about this process https://guides.github.com/activities/hello-world/
Did you mean ping @publiclab/reviewers here ... or in the chat room https://publiclab.org/chat?
Yeah PR means pull request. You need to ping just by writing @publiclab/reviewers in comments.
Ok, I've submitted the pull request. Should I ping the @publiclab/reviewers team directly in the pull request?
Hi @rob4abcba ...i am not able to see your Pull Request .
Ohk you have opened a Pull Request in your forked repository of plots2 which is rob4abcba/plots2 , you need to open a Pull Request in publiclab/plots2
. Makes sense ?
Thanks 😄 !
The only problem with your PR @rob4abcba is that you opened it in the wrong place (as pointed out by @sagarpreet-chadha above). I've looked at the change you made and it is exactly what is expected. So this is nearly complete.
Are you saying I should go here to make the pull request? https://github.com/publiclab/plots2/pulls
Should I edit the code in a branch first, before clicking the link above to make the pull request? I tried the above link before and it said I didn't have any changes to commit. I guess what it's saying is that I made the correction in my forked repository, not in the official plot2 repository. Do I have permission to make the change directly in the plot 2 repository?
I saw a error that line 30 of here is wrong? https://github.com/rob4abcba/plots2/blob/patch-1/test/integration/routes_test.rb#L30
No, not exactly in this repo. The PR should be made from your fork.
I checked your fork and you created a new branch, so that is OK. The link you gave above won't help you much. GitHub will automatically redirect you here from you fork when you push up new code. The changes should be made in YOUR fork, not in publiclab/plots2 (you don't have permission for that anyway).
Here's how it should go:
Normally, after you push your new branch to your fork with git push origin <new-branch>, you go visit your own fork on GitHub. There, you'll be welcome with a message (in pink, I think) about the code you just pushed. On the right, you'll find a green button that says something about comparing..., you just click on it. GitHub will automatically know to open the PR in publiclab/plots2 as it is the original repo for your fork. The rest is intuitive.
Hope this helps. If not, just create another branch (from master), make the change needed, and follow the steps above.
Hello there! First timer here. Has this issue been resolved?
Hi, i believe it's being addressed in #2562 although perhaps @rob4abcba needs some assistance there?