Added option to disable deleting of non empty repositories through the u... #180

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@peto268
Contributor

peto268 commented Apr 26, 2014

Hello, i dont really like the idea of using federation to protect repositories against unintentional deletion as suggested in: https://groups.google.com/forum/#!topic/gitblit/qfsxQSUD79c.
This commit adds a new option which disables the delete link if the repository is not empty. If the administrator wishes to delete such a repository, he needs to delete it from the filesystem.

Best regards,
Peter Mihalik

@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit Apr 26, 2014

Owner

This is a reasonable request. My preference, however, is to not add the delete link in the first place instead of checking in the action handler. I think eventually I will remove edit & delete from these pages in favor of editing and deleting within the repository subpages.

Owner

gitblit commented Apr 26, 2014

This is a reasonable request. My preference, however, is to not add the delete link in the first place instead of checking in the action handler. I think eventually I will remove edit & delete from these pages in favor of editing and deleting within the repository subpages.

@peto268

This comment has been minimized.

Show comment
Hide comment
@peto268

peto268 Apr 28, 2014

Contributor

Checking in the action handler is just because of race condition that could occur between the rendering of the link and execution of the handler. If the repository cannot be deleted the link just gets disabled. Do you plan to remove the delete link and place the functionality to another page? Still i would like to have the option to disable deleting through the gui.

Contributor

peto268 commented Apr 28, 2014

Checking in the action handler is just because of race condition that could occur between the rendering of the link and execution of the handler. If the repository cannot be deleted the link just gets disabled. Do you plan to remove the delete link and place the functionality to another page? Still i would like to have the option to disable deleting through the gui.

@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit Apr 28, 2014

Owner

Ah, of course. Good point. I'm thinking of moving Delete into the Edit Repository page. This makes it much less accessible and will probably make many folks happy. I may move Edit too. Both of those complicate the repositories panel which is a complex piece of code and it is due for an overhaul. Delete is especially bothersome because of it's reliance on the Wicket session for an otherwise stateless page.

I'll probably merge your suggestion, but the location of Delete may change before 1.6.0 is released.

Owner

gitblit commented Apr 28, 2014

Ah, of course. Good point. I'm thinking of moving Delete into the Edit Repository page. This makes it much less accessible and will probably make many folks happy. I may move Edit too. Both of those complicate the repositories panel which is a complex piece of code and it is due for an overhaul. Delete is especially bothersome because of it's reliance on the Wicket session for an otherwise stateless page.

I'll probably merge your suggestion, but the location of Delete may change before 1.6.0 is released.

@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit May 8, 2014

Owner

I'm hacking on this a bit. I've eliminated the delete links from the repositories page and the user page. The only place you can delete a repository is from inside the Edit Repository page and there is still the pop-up confirmation prompt. Do you still require the setting to disable deletion of non-empty repositories?

screenshot from 2014-05-08 19 58 06

Owner

gitblit commented May 8, 2014

I'm hacking on this a bit. I've eliminated the delete links from the repositories page and the user page. The only place you can delete a repository is from inside the Edit Repository page and there is still the pop-up confirmation prompt. Do you still require the setting to disable deletion of non-empty repositories?

screenshot from 2014-05-08 19 58 06

@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit May 9, 2014

Owner

I've merged this into develop with your proposed setting.

Owner

gitblit commented May 9, 2014

I've merged this into develop with your proposed setting.

@gitblit gitblit closed this May 9, 2014

@peto268

This comment has been minimized.

Show comment
Hide comment
@peto268

peto268 May 9, 2014

Contributor

Thanks

On Fri, May 9, 2014 at 3:56 PM, James Moger notifications@github.comwrote:

Closed #180 #180.


Reply to this email directly or view it on GitHubhttps://github.com/gitblit/gitblit/pull/180#event-119551760
.

Contributor

peto268 commented May 9, 2014

Thanks

On Fri, May 9, 2014 at 3:56 PM, James Moger notifications@github.comwrote:

Closed #180 #180.


Reply to this email directly or view it on GitHubhttps://github.com/gitblit/gitblit/pull/180#event-119551760
.

gitblit added a commit that referenced this pull request Sep 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment