Closed dbrgn closed 10 years ago
Made it like this:
Not sure if this is good... @cfaessler and @dbrgn, what do you think?
I think we should list all the objects that will be deleted, instead of just showing a number.
Another problem is the problem of indirect dependencies. Are there any objects that are dependent on policies, files or enforcements? In that case these would get deleted too.
I'm really not 100% sure whether we should allow this at all. If we decide to support cascading deletes, we should explicitly mark it in the model with on_delete=models.CASCADE
. Otherwise, we could also show an error message if deleting a protected object fails.
I share you opinion. Here is the same with (collapsible) lists of the objects:
The indirect dependencies are already covered in this version. But as you said, I'm not sure if we should allow casacing deletes either.
If we do, we have to implement similar dialogs for files
, policies
, packages
, regids
and swid tags
.
This is awesome! :) I like it. We simply need to be very careful when implementing it, and when adding new FKs in the future.
Something else that we need to handle: We have the same problem (cascading deletes) in the API (although it's not yet implemented and possibly won't be).
Implemented all (... all I could think of :wink:, please check) delete dialogs with dependencies. @dbrgn, please review and test, tnx!
Unfortunately the better english broke the layout of one of our popups :(
Otherwise, good to merge! :yellow_heart: :heart: :blue_heart:
Two resolutions: