gitbucket / gitbucket-gist-plugin

A GitBucket plug-in which provides code snippet repository like Gist
http://gitbucket.herokuapp.com/gist
Apache License 2.0
69 stars 25 forks source link

private snippets not shown after clicking "Gist" link in webapp (behavior change from 3.10) #23

Closed axb21 closed 8 years ago

axb21 commented 8 years ago

When I use gitbucket 3.11 with the new gist plugin 3.11.0, none of my private snippets show up when I click the Gist link at the top of the gitbucket webapp page. If I downgrade gitbucket back to 3.10.1, and the plugin back to 3.10.0, my private snippets are shown. So, there has been a behavior change between 3.10 and 3.11. There is no obvious (to me) way to list private gists in 3.11.

If it matters, I'm simply running java -jar on the war file from the gitbucket release page, i.e. I'm not using an external servlet container. So for the purposes of this issue when I say upgrading/downgrading gitbucket I mean replacing the gist plugin jar file in $HOME/.gitbucket/plugins and then running java -jar on a different war file.

To reproduce:

  1. make sure gitbucket 3.11 and gist plugin 3.11.0 are running
  2. create a new private snippet by clicking New snippet, etc
  3. click away from the gists page to somewhere else
  4. click the Gist link at the top of the page (which brings you to URL/gist)
  5. observe that the snippet you created in 2. is not visible (even though you are still logged in as the user who created the snippet)
  6. click New snippet (which brings you to URL/gist/_new)
  7. observe that the snippet you created in 2. is now visible on the new snippet page
  8. click the Your snippets button (which brings you to URL/gist/USERNAME)
  9. observe the snippet you created in 2. is visible in your list of snippets

If you follow the same flow 1-5, but create a public snippet instead of a private one, the behavior is different: you do see your gist listed after step 4, and do not observe the behavior in 5 above.

If you follow the same flow 1-5 in gitbucket 3.10.1 / gist plugin 3.10.0, you will see your private gist after step 4; i.e., the behavior listed in 5. is different in 3.10 vs. 3.11.