Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace require_always feature with simpler require_always_email feature #399

Closed
mstilkerich opened this issue Sep 17, 2022 · 0 comments
Closed
Assignees
Milestone

Comments

@mstilkerich
Copy link
Owner

mstilkerich commented Sep 17, 2022

Currently, we do not have all information in the database needed for preset addressbook in common operations. Since presets are only processed during login, it is possible that, when the admin removes a preset, an addressbook of an already logged in user belonging to that preset will still be loaded and we cannot access the preset configuration anymore. So far, we are using default values in that situation.

With the introduction of the flags column for addressbooks, we have quite a few bits we can use to store simple information, and the readonly setting is stored as such a flag. This leaves the require_always config option. It is currently possible to use this option for any DB column, which apart from email includes the various name columns. While we could use a bit for each of these, I cannot see the use case for any require always value other than email, which can be used for large company addressbooks that may include lots of contacts without email addresses and thus limited use in roundcube. Why one would want to filter out contacts that have a first name, or last name, etc. set, I cannot see.

So to simplify, for v5 replace the require_always feature with a simpler require_always_email feature that does the same as a previous 'require_always' => ['email'] setting. Require always on the other fields will no longer be possible. We could re-add it later if it turns out it is actually a useful feature.

Having done this, only the main plugin class (for setting the special addressbooks, log levels, etc.) and the UI (for evaluating fixed settings of presets) would depend on the AdminSettings class, which clears up the dependencies and particularly the circular dependency AddressbookManager <> AdminSettings.

@mstilkerich mstilkerich added this to the 5.0.0-beta1 milestone Sep 17, 2022
@mstilkerich mstilkerich changed the title Replace require_always feature with s Replace require_always feature with simpler require_always_email feature Sep 17, 2022
@mstilkerich mstilkerich self-assigned this Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant