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

ISPConfig Vacation support #20

Closed
wants to merge 4 commits into from
Closed

ISPConfig Vacation support #20

wants to merge 4 commits into from

Conversation

micha137
Copy link
Contributor

@micha137 micha137 commented Nov 2, 2012

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.

// 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.
Copy link
Member

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.

Copy link
Contributor Author

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:

// 'username' => $ob->getParam('username')

Because I use an unmodified Ingo example hook, I don't provide another example.

@micha137
Copy link
Contributor Author

Regarding MySQL access, I developed a patch for ISPConfig and requested them to apply it:
http://bugtracker.ispconfig.org/index.php?do=details&task_id=2540

When it is applied, the ISPConfig support in Ingo would simplify a lot.

@micha137
Copy link
Contributor Author

So now my only remaining question is how to remove/make readonly the vacation reason form field in Ingo...

@yunosh
Copy link
Member

yunosh commented Nov 23, 2012

Why? Can't you set a reason in ISPConfig?

@micha137
Copy link
Contributor Author

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" :(

@yunosh
Copy link
Member

yunosh commented Nov 23, 2012

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.
Then in the individual forms, these features need to be checked and form fields added selectively.

@micha137
Copy link
Contributor Author

I implemented what you suggested. Is this OK?

@micha137
Copy link
Contributor Author

Any news, can this go in?

@micha137
Copy link
Contributor Author

micha137 commented Jan 4, 2013

Happy new year, ping :)

@yunosh
Copy link
Member

yunosh commented Jan 22, 2013

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.

@micha137
Copy link
Contributor Author

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?

@micha137
Copy link
Contributor Author

Ping

@yunosh
Copy link
Member

yunosh commented Jan 31, 2013

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.
Looks good beside that, just minor issues (one incorrect indention; always linebreaks after curly braces).

Michael Bunk added 4 commits February 8, 2013 16:14
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).
@micha137
Copy link
Contributor Author

micha137 commented Feb 8, 2013

OK, fixed the remaining issues, rebased and rewrote the history, so that it is easy to follow...

@micha137
Copy link
Contributor Author

Ping :)

@micha137
Copy link
Contributor Author

Ping... no response from host...

@yunosh
Copy link
Member

yunosh commented Feb 26, 2013

Merged to master resp. ingo_3_1 branch.

@yunosh yunosh closed this Feb 26, 2013
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.

2 participants