changeset 8697:c9ed3bf730b9 HEAD

acl: We stopped calling hook_mail_storage_created for internal namespaces.
author Timo Sirainen <tss@iki.fi>
date Sun, 01 Feb 2009 22:24:56 -0500
parents 20345491824c
children 3aeb924bae35
files src/plugins/acl/acl-storage.c
diffstat 1 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/acl/acl-storage.c	Sat Jan 31 20:15:12 2009 +0200
+++ b/src/plugins/acl/acl-storage.c	Sun Feb 01 22:24:56 2009 -0500
@@ -174,19 +174,18 @@
 
 	if ((storage->ns->flags & NAMESPACE_FLAG_INTERNAL) != 0) {
 		/* no ACL checks for internal namespaces (deliver) */
-		return;
-	}
+	} else {
+		astorage = p_new(storage->pool, struct acl_mail_storage, 1);
+		astorage->module_ctx.super = storage->v;
+		storage->v.destroy = acl_storage_destroy;
+		storage->v.mailbox_open = acl_mailbox_open;
+		storage->v.mailbox_create = acl_mailbox_create;
 
-	astorage = p_new(storage->pool, struct acl_mail_storage, 1);
-	astorage->module_ctx.super = storage->v;
-	storage->v.destroy = acl_storage_destroy;
-	storage->v.mailbox_open = acl_mailbox_open;
-	storage->v.mailbox_create = acl_mailbox_create;
+		backend = acl_mailbox_list_get_backend(mail_storage_get_list(storage));
+		acl_storage_rights_ctx_init(&astorage->rights, backend);
 
-	backend = acl_mailbox_list_get_backend(mail_storage_get_list(storage));
-	acl_storage_rights_ctx_init(&astorage->rights, backend);
-
-	MODULE_CONTEXT_SET(storage, acl_storage_module, astorage);
+		MODULE_CONTEXT_SET(storage, acl_storage_module, astorage);
+	}
 
 	if (acl_next_hook_mail_storage_created != NULL)
 		acl_next_hook_mail_storage_created(storage);