-
Notifications
You must be signed in to change notification settings - Fork 127
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
ISPConfig Vacation support #20
Conversation
// which has no function to query the mailuser.mailuser_id if you only have the | ||
// email address (mailuser.login). Create this user on the MySQL server. | ||
// It requires SELECT permission for database 'dbispconfig', table 'mail_user', | ||
// columns 'mailuser_id' and 'login' only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this always necessary or only when logging in with the email address instead of the user id? In the latter case, this should be an authentication hook example for Ingo instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MySQL access is always necessary, ISPConfig's mailuser.mailuser_id is numeric and ISPConfig internal, so nobody would like to login using it.
The best way to do it would be to add a function to ISPConfig's SOAP API to query the mailuser_id given the email address. But I would like to get this into Ingo first, then modify ISPConfig and then simplify the ISPConfig support in Ingo, if you agree.
I have set up my Horde installation to login using the email address and use example #2 transport_auth() hook to get the full email address in Ingo_Transport_Ispconfig:
horde/ingo/config/hooks.php.dist
Line 43 in 3375cf1
// 'username' => $ob->getParam('username') |
Because I use an unmodified Ingo example hook, I don't provide another example.
Regarding MySQL access, I developed a patch for ISPConfig and requested them to apply it: When it is applied, the ISPConfig support in Ingo would simplify a lot. |
So now my only remaining question is how to remove/make readonly the vacation reason form field in Ingo... |
Why? Can't you set a reason in ISPConfig? |
No, there is neither a form field nor a database field for the vacation reason. It is hardcoded in some admin-only acessible template as "Out of office reply" :( |
We don't have the ability to limit rule forms based on the backend's capabilities yet. That would need to be added. Add a two-level $_categoryFeatures property to Ingo_Script that accompanies $_categories and defines which features are available in individual categories, defaulting to all. |
I implemented what you suggested. Is this OK? |
Any news, can this go in? |
Happy new year, ping :) |
You still need to run through the coding styles. There are curly if-braces on the wrong line, wrong indention, missing PHP 5 visibility specifiers, wrong order of properties and functions etc. |
OK, did it. It must have been hard for you to read my "unconventional" code... Should I squash some of my commits together, so the repeated changes don't litter the Ingo commit history? |
Ping |
Yes, squashing would be good to have single commits for individual changes. You should also rebase while you're at it, so it's easier to merge. |
This new functionality will be used to hide form fields not supported by the ISPConfig backend (i.e. vacation subject is not user configurable in ISPConfig).
OK, fixed the remaining issues, rebased and rewrote the history, so that it is easy to follow... |
Ping :) |
Ping... no response from host... |
Merged to master resp. ingo_3_1 branch. |
Basically, the support consists of two classes, one derived from Ingo_Script and another one derived from Ingo_Transport. Also, ingo/config/backends.php is modified with an example config.
I'd be happy to get some feedback. Can I leave the extensive debugging code in the code? Is there framework support for debug messages which should be used?
ISPConfig doesn't support a user configurable vacation reason. So I would like to hide the corresponding form field in the Ingo webinterface (or make it readonly). What is the best way to accomplish this? I'm thinking about modifying Ingo_Form_Vacation::__construct(), handing over an additional parameter with the list of form fields to hide.