schneidmaster / gitreports.com

Git Reports is a free service that lets you set up a stable URL for anonymous users to submit bugs and other Issues to your GitHub repositories.
MIT License
134 stars 27 forks source link

Issues with private organization repositories #10

Closed isaacdontjelindell closed 10 years ago

isaacdontjelindell commented 10 years ago

This is an issue that is probably fairly rare, but it's been pretty odd.

I had gitreports set up on my private repository in an organization (LutherSrProject/TapVote). That organization also has some other private repos that I don't have access too.

Someone else in that organization started using gitreports for their private organization repo (LutherSrProject/%something% - I don't actually know what it's called).

After they did that, gitreports was deactivated for my project (TapVote). Even more oddly, that other user showed up in my gitreports admin page for the TapVote repo. The other user is essidy01.

I haven't talked to the other user since, but after I reactivated gitreports for my repo a couple of times, he no longer shows up. He mentioned this morning that I also showed up as a user in his gitreports admin page.

I'm assuming this is some issues with multiple private repos in an organization. Is there anything that could be done about this?

I can provide other info/help if needed (and have contact with the other user in the organization to provide info from his end if needed).

schneidmaster commented 10 years ago

That is very interesting. I'll look into it this afternoon. 

isaacdontjelindell commented 10 years ago

I can confirm that when I reenabled gitreports on my repo, it disabled it on essidy01's.

schneidmaster commented 10 years ago

Ah. Yeah. Smart one here didn't consider your particular use case. It's a slightly complicated fix (have to alter the way repositories are tied to users and test it against other use cases) - unless it's incredibly urgent, I'll get to it tomorrow afternoon. I have a final tomorrow morning.

isaacdontjelindell commented 10 years ago

Absolutely not urgent.

Thanks!

essidy01 commented 10 years ago

Agreed, not urgent. We're demoing for finals ourselves, so we completely understand. Best of luck on yours! Thanks for offering this service. Definitely a great service.

schneidmaster commented 10 years ago

I believe that fix solves the issue. If you guys could test and let me know, I'd appreciate it- I don't have any organizations with private repositories to test with and I'm too cheap/poor to pay for one :P

isaacdontjelindell commented 10 years ago

I'm waiting to hear back from essidy01 to see if it's working on his repo. One oddity: his username still shows up as user in the gitreports admin page for my repository. Is the update of that info a periodic job (i.e. should I just wait a bit?)

schneidmaster commented 10 years ago

That should be fixed with the push I just made- check now?

schneidmaster commented 10 years ago

The original issue, if anyone's curious, is that I didn't realize/consider that organizations could have private repositories or separated permissions, so I was generally assuming that when one user logged in and I grabbed all of their repositories from their organizations, that was all of the repositories that an organization would have and each future organization user would have equal access to those repositories. I fixed it by making repositories <-> users a many-to-many relationship, and adding/removing users to repositories individually rather than by organization. With the second push I just made, I fixed a latent bug where I was displaying all of the organization's users on the repository page rather than just the users with access to that repo.

essidy01 commented 10 years ago

Yep, that fixed the issue on my end as well, and it looks like Isaac's reports are still working. Thanks for the quick fix on this! His name also no longer shows under the users, so the changes you made to a many-to-many relationship works just fine.

isaacdontjelindell commented 10 years ago

Yep, his name is gone. It seems to be working, pending confirmation from @essidy01 that enabling it on my repo doesn't disable on his.

Thanks much for your effort!

schneidmaster commented 10 years ago

Awesome, glad it's good to go! :)