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

radicale missing library and updated config.tpl #469

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomas-kucera
Copy link

No description provided.

@Spitfireap
Copy link
Member

Hi, could you specify it as extension in config dict template and have the possibility to disable it ?

@tomas-kucera
Copy link
Author

Hi, could you specify it as extension in config dict template and have the possibility to disable it ?

Will have a look into it. 😉

@tomas-kucera
Copy link
Author

@Spitfireap looked into the option to make it optional and have a question about how you meant it. I found two possible ways that looked reasonable to me:

  1. make it a as a part of the modoboa.extensions config - it would be there by default and could be deleted at will - based on this during the modoboa installation and configuration, if this extension would be present, it would modify the radicale configuration appropriately

  2. add a new configuration option under radicale (for example auth_method), that woudl default to radicale_dovecot_auth (as it is now) but could be changed to radicale_modoboa_token_auth (or any other available method) - based on this setting if the radicale_modoboa_token_auth method would be specified, it would install the additional package. After looking into the installer, it looks to me that the installer cannot comment / uncomment (add / remove) config lines based on the config.tpl file - so I would include the two related config options (radicale_modoboa_token_auth_check_url and radicale_modoboa_token_auth_token) by default commented - but if it is possible to dymamically add / remove / comment / uncomment lines using the config.tpl, it would do it properly; and also it would require a little comment explaining what it is

I prefer the scenario number 2. What is your thought or did you have anything else on your mind?

@Spitfireap
Copy link
Member

Spitfireap commented Jan 12, 2023

Hey,

I agree with you for number 2. As for commenting/uncommenting at run time, you can take a look at this, it is used here for instance. You could simply add a check for the auth mechanism in get_template_context on radicale.py. :)

@tonioo
Copy link
Member

tonioo commented Jan 12, 2023

@tomas-kucera Option 2 looks indeed better and @Spitfireap suggestion for config file is interesting but you're right, it is not easy to add/remove lines to templates because I tried to avoid including external deps to the installer.
One question I'm curious about : how did you end up installing this authentication plugin?

@tomas-kucera
Copy link
Author

I fully support the minimalistic dependency approach. I seem to be able to conditionally add lines though. I have it prepared, just need to test it yet.

The answer to your question is very simple. I wanted to be able to share calendar (read-only) publicly to anyone without the need to be a user of the same domain. And so the token based sharing was my choice. But it did not work and by debugging I found that this is what is missing. After installation and configuration I was able to achieve what I wanted. 😉

I had a chat about with @Spitfireap on Discord about it and decided to make it a PR.

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

Successfully merging this pull request may close these issues.

3 participants