Disabling the public key storage for user accounts?
| Project: | GnuPG |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Arto |
| Status: | closed |
| Issue tags: | GnuPG, OpenPGP, ubercart |
Jump to:
I've written a module using your GnuPG API. It's an Ubercart payment gateway module, to be used in place of the default uc_credit module for those that just need to encrypt and store the CC information so they can offload it to another system for decryption and processing. It hasn't been released to the public yet, but the encryption stuff is working just fine so thanks for that. :)
Anyway, I noticed that the GnuPG module adds a Cryptography category to user accounts even when 'Encrypt outgoing email' is set to 'Never' in the admin settings. There doesn't seem to be a permission to grant/deny access to store GnuPG keys in user accounts. People using the GnuPG API may not need/want users to have the option of storing GnuPG keys in their accounts. For the site I'm currently working on, it would only confuse users. I can't see a way of removing this Cryptography category from user profiles without hacking your module, which I definitely don't want to do.
Long term, ideally I think this should be split into two separate modules, one being the GnuPG API, and the other being the encrypted email features. In the meantime, it would be great if there was a way to disable the Cryptography category in user accounts, without having to hack the module. I can do up a patch if you want. If there's some other way of disabling the Cryptography category that I'm unaware of, please let me know.
Thanks!

#1
Nevermind, I see you are creating a new OpenPGP module and scrapping this one...
If anyone needs to get rid of the Cryptography user category in the meantime, it can be done by creating a custom module, implementing hook_menu_alter(), and unsetting the menu item. Like so:
<?phpfunction mymodule_menu_alter(&$items) {
unset($items['user/%user_category/edit/gnupg']);
}
?>
#2
Adam, yep - the OpenPGP module will not force this user account tab on you. Rather, those who want equivalent functionality can utilize the core's Profile module to create a text area, which can then be configured in the OpenPGP's module settings.
#3
Sounds cool, looking forward to checking it out.
#4
Now that the first release of the aforementioned OpenPGP module is available, this module is finally deprecated.
I'm closing this particular issue out as "fixed" since the new module does make the per-user public key storage an optional feature as described in my previous comment above (that is, users' public keys can now be stored in profile fields, if wanted, but are not an essential part of the module's functionality when unwanted).
(There is currently still a minor wart for your use case, in that the OpenPGP module does require the core Profile module to be enabled, even if you don't intend to store users' public keys. That will probably get fixed in the next release.)
The new OpenPGP module provides a seamless upgrade path in that any previous GnuPG module settings will get migrated when installing the newer module. The APIs are also similar, so it should be easy to figure out what you need to change in your own module; in case of any problems, feel free to contact me here or via the contact form.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.