tnc-ba / strongTNC

BYOD TNC Database Management Tool
GNU Affero General Public License v3.0
0 stars 0 forks source link

Deleting Directory removes all related Files #162

Closed dbrgn closed 10 years ago

dbrgn commented 10 years ago

Two resolutions:

d22 commented 10 years ago

Made it like this:

delete-dir

del-dir-modal

Not sure if this is good... @cfaessler and @dbrgn, what do you think?

dbrgn commented 10 years ago

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.

d22 commented 10 years ago

I share you opinion. Here is the same with (collapsible) lists of the objects: del-dir-list-1 del-dir-list-2

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.

dbrgn commented 10 years ago

This is awesome! :) I like it. We simply need to be very careful when implementing it, and when adding new FKs in the future.

dbrgn commented 10 years ago

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).

d22 commented 10 years ago

Implemented all (... all I could think of :wink:, please check) delete dialogs with dependencies. @dbrgn, please review and test, tnx!

dbrgn commented 10 years ago

Unfortunately the better english broke the layout of one of our popups :(

img

dbrgn commented 10 years ago

Otherwise, good to merge! :yellow_heart: :heart: :blue_heart: