justinvh / gitpaste

DEPRECATED - GitPaste is a clone of GitHub's Gist.
Other
184 stars 49 forks source link

"All pastes" not updated #22

Closed bdcribbs closed 11 years ago

bdcribbs commented 11 years ago

I created an account on the demo site and created a few pastes. They never showed up on the "All Pastes" list.

I installed gitpaste on my own server as a test, and made some test pastes, and the same thing. "All pastes" shows nothing on my install, since the only pastes were made by me so far. Hmm... I wonder if I make some anonymous pastes to my test. Hold on a sec...

Oh! Yep, that's the problem. The paste's as anonymous immediately show up. But the pastes as a logged in user never do.

That seems like a bug, unless I missed something crucial in the setup or configuration.

justinvh commented 11 years ago

You would be right. That is a bug. It's polling only the anonymous user's pastes. Good call.

bdcribbs commented 11 years ago

I'm not sure how to correct this. (Sorry, I do not know python well). I've traced it down to def user_pastes in the paste/views.py file which I think needs to be altered. It looks like the logic there will return only the logged in user's pastes if they are logged in, and all non-private pastes if they are not. But that doesn't make any sense, so I'm probably misunderstanding the code.