r445 - in trunk/faxtomail-ui-web/src/main: java/com/franciaflex/faxtomail/web/job webapp/WEB-INF/content/admin
Author: echatellier Date: 2014-07-28 16:00:16 +0200 (Mon, 28 Jul 2014) New Revision: 445 Url: http://forge.codelutin.com/projects/faxtomail/repository/revisions/445 Log: fixes #5540: ajouter l'autorisation de rejet lors du routage au niveau de chaque boite mail de reception Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp Modified: trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java =================================================================== --- trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java 2014-07-28 13:39:20 UTC (rev 444) +++ trunk/faxtomail-ui-web/src/main/java/com/franciaflex/faxtomail/web/job/MailFilterJob.java 2014-07-28 14:00:16 UTC (rev 445) @@ -200,7 +200,7 @@ store.connect(account.getLogin(), account.getPassword()); defaultFolder = store.getDefaultFolder(); inbox = defaultFolder.getFolder("INBOX"); - checkEmailsOfFolder(inbox); + checkEmailsOfFolder(account, inbox); } catch (Exception e) { log.error("Error while getting emails from the mailbox", e); @@ -231,10 +231,12 @@ } /** - * Check the emails of teh folder, create the emails in the database and delete the email in the folder + * Check the emails of teh folder, create the emails in the database and delete the email in the folder. + * + * @param emailAccount email account currently checked * @param folder the folder to check */ - protected void checkEmailsOfFolder(Folder folder) { + protected void checkEmailsOfFolder(EmailAccount emailAccount, Folder folder) { try { folder.open(Folder.READ_WRITE); @@ -350,7 +352,7 @@ modifiedProperties.add(Email.PROPERTY_MAIL_FOLDER); // if client is null and folder - if (client == null) { + if (client == null && emailAccount.isRejectAllowed()) { Boolean reject = null; String rejectMessage = null; String senderEmail = null; Modified: trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp =================================================================== --- trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-07-28 13:39:20 UTC (rev 444) +++ trunk/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp 2014-07-28 14:00:16 UTC (rev 445) @@ -990,6 +990,7 @@ <th>Serveur</th> <th>Port</th> <th>Utilisateur</th> + <th>Rejet</th> <th/> </tr> </thead> @@ -999,6 +1000,7 @@ <td>{{emailAccount.host}}</td> <td>{{emailAccount.port}}</td> <td>{{emailAccount.login}}</td> + <td>{{emailAccount.rejectAllowed ? 'Autorisé' : 'Non autorisé'}}</td> <td> <a class="btn btn-danger btn-xs" ng-click="removeEmailAccount($index)"> <span class="glyphicon glyphicon-remove"></span> @@ -1013,7 +1015,7 @@ <!-- <input type="text" class="form-control" ng-model="newAccount.protocol" /> --> <select id="emailAccountProtocol" ng-model="newAccount.protocol" ng-options="protocol as protocol for (protocol, port) in emailProtocolPorts"></select> </div> - <div class="form-group col-xs-4"> + <div class="form-group col-xs-3"> <label for="emailAccountHost" class="control-label">Serveur:</label> <input id="emailAccountHost" name="newAccountHost" type="text" class="form-control" ng-model="newAccount.host" ng-minlength="1" /> </div> @@ -1031,6 +1033,14 @@ <label for="emailAccountPassword" class="control-label">Mot de passe:</label> <input id="emailAccountPassword" type="password" class="form-control" ng-model="newAccount.password"> </div> + <div class="form-group col-xs-1"> + <label class="control-label">Rejet:</label> + <div class="checkbox"> + <label> + <input id="emailRejectAllowed" type="checkbox" ng-value="true" ng-model="newAccount.rejectAllowed"> Autorisé + </label> + </div> + </div> <div class="form-group col-xs-2"> <br /> <button type="button" class="btn btn-info" ng-disabled="!newAccount.protocol || !newAccount.host || !newAccount.port || !newAccount.login || addEmailAccountForm.$invalid"
participants (1)
-
echatellier@users.forge.codelutin.com