fix #81 (untested)
This commit is contained in:
parent
145a79710c
commit
d8b9d2f62f
@ -44,11 +44,12 @@ public class SecureDefaultModuleImpl extends AbstractModuleImpl {
|
|||||||
if (!transaction.getLoginUser().hasHostmasterRole()
|
if (!transaction.getLoginUser().hasHostmasterRole()
|
||||||
&& (filterAnnot = getSecurityFilterAnnotation(entityClass)) != null) {
|
&& (filterAnnot = getSecurityFilterAnnotation(entityClass)) != null) {
|
||||||
String securityCondition = filterAnnot.value();
|
String securityCondition = filterAnnot.value();
|
||||||
if (condition != null && condition.length() > 0)
|
if (condition != null && condition.length() > 0) {
|
||||||
condition = "(" + condition + ")" + " AND ( "
|
condition = "(" + condition + ")" + " AND ( " + securityCondition + ")";
|
||||||
+ securityCondition + ")";
|
}
|
||||||
else
|
else {
|
||||||
condition = securityCondition;
|
condition = securityCondition;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// do query
|
// do query
|
||||||
|
@ -158,7 +158,8 @@ public class EMailAddress extends AbstractEntity implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Transient
|
@Transient
|
||||||
public String getFullDomain() {
|
public String getFullDomain() {
|
||||||
return (getSubdomain() == null ? "" : (getSubdomain() + "."))
|
String sub = getSubdomain();
|
||||||
|
return (sub == null || sub.length() == 0 ? "" : (sub + "."))
|
||||||
+ getDomain().getName();
|
+ getDomain().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,12 +49,12 @@ public class EMailAddressProcessorFactory implements EntityProcessorFactory {
|
|||||||
int emailAddressCount = emailAddressCount(em, email);
|
int emailAddressCount = emailAddressCount(em, email);
|
||||||
if (emailAddressCount == 0) {
|
if (emailAddressCount == 0) {
|
||||||
// remove the domain from virtual.db
|
// remove the domain from virtual.db
|
||||||
|
String fullDomain = email.getFullDomain();
|
||||||
cp.appendProcessor(
|
cp.appendProcessor(
|
||||||
new ShellProcessor( "postmap -d '" + email.getFullDomain() + "' /etc/postfix/virtual" ) );
|
new ShellProcessor( "postmap -d '" + fullDomain + "' /etc/postfix/virtual" ) );
|
||||||
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
WaitingTasksProcessor waitingTasksProcessor = new WaitingTasksProcessor(cp);
|
||||||
String domName = email.getDomain().getName();
|
|
||||||
for (String queueName : new String[] { "mail1", "mail2", "mail3" }) {
|
for (String queueName : new String[] { "mail1", "mail2", "mail3" }) {
|
||||||
waitingTasksProcessor.appendProcessor(queueName, createMailinDeleteProcessor(domName), queueName + ".hostsharing.net");
|
waitingTasksProcessor.appendProcessor(queueName, createMailinDeleteProcessor(fullDomain), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
return waitingTasksProcessor;
|
return waitingTasksProcessor;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user