Feature #2539
openRecursive deletion of resources
0%
Description
Ticket from support: https://rhodecode.tenderapp.com/help/discussions/problems/7125-rc-225-after-deleting-repo-groups-on-file-system-then-rescan-the-repo-groups-are-always-in-the-db
Use case:
- gemalto needs to often delete large repository groups, current system doesn't allow doing it from web interface
- users need to delete manually each repo inside repo group and then delete the group itself
Currently our system supports this operation in cleanup mode, so you can delete whole directory from the filesystem and run remap-and rescan. This is a workaround and should allow
big cleanup, but it's far from being straightforward to do.
We need a consistent interface for deletion of resource that hold other resources. This should currently include two places
- user deletion (that hold repo groups/user groups/repositories)
- repository group deletion (that hold other repositories)
You can delete user or repository group in two ways, goind to admin > users or admin > repo groups and clicking delete.
In case there are dependent objects, we should trigger a warning flash message, and redirect user to advanced settings section of user, or repo group. and allow them to do recursive delete.
There's already an interface for that in users advanced section, when you can select if you want to delete or transfer ownership of repositories or groups that user owns.
We should re-use the logic, and make the same option available to deletion of repository groups. The user advanced section also needs some small improvements.
Recursive delete should have two options.
- delete resources
- transfer ownership of resources to a different user in the system
Currently part of that is implemented in user > settings > advanced where we have delete or detach option.
Detach option unfortunetly picks the first super admin in the system which leads to
odd results and you cannot control to whom you need to transfer the ownership.
Subtasks