Giter Club home page Giter Club logo

Comments (5)

svendecabooter avatar svendecabooter commented on July 3, 2024

To check if this is still necessary.
Drupal core will by default throw an exception if entities still exist of the entity type defined by the module to be uninstalled.

So currently this will already result in the following error (via Drush):

exception 'Drupal\Core\Extension\ModuleUninstallValidatorException' with message 'The following reasons prevent the modules from being [error]
uninstalled: There is content for the entity type: Encrypted field value'.

from field_encrypt.

nerdstein avatar nerdstein commented on July 3, 2024

Do we need to ask the user to do something before uninstalling? My guess is we might want to decrypt everything

from field_encrypt.

svendecabooter avatar svendecabooter commented on July 3, 2024

As long as there is still encrypted data in the site (EncryptedFieldValue entities), the validation will fail and the field_encrypt module will not be able to uninstall.
So the user will need to take action and make sure every field is decrypted, before uninstall will be able to happen.

I don't think it will be possible to do it automatically, and probably not advised either. We would need to interact between the moment the user clicks "Uninstall", and the moment the validator throws an error that there is still encrypted content. Decrypting everything on the fly at that point might result in timeouts, if not handled by a queue. Also the user might want to get the error instead, reminding him that uninstalling the module will change his data (e.g. someone who mistakes the D8 uninstall functionality for the D7 enable-disable module functionality - not wanting to remove stuff, but just deactivate temporarily)

Or do you suggest we add some UI to have a one-click-decrypt-everything feature?

from field_encrypt.

nerdstein avatar nerdstein commented on July 3, 2024

I do recommend we do that. Or, have an administrative page that lists out every place in which fields are encrypted with a button to remove encryption for a line item (with a warning, of course). Or, both removal of all encryption and line items :) I want to enable users to quickly uninstall, if they so desire.

from field_encrypt.

svendecabooter avatar svendecabooter commented on July 3, 2024

Described functionality has been added

from field_encrypt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.