changeset 20775:333aef265b3f

lib-storage: remove attribute accessibility checks index_storage_attribute_{set,get} should assume that the caller performed due diligence and checked whether or not the user is allowed to store under the key.
author Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
date Tue, 13 Sep 2016 07:49:41 -0400
parents bcfa015fe9b8
children 71ff4ca854f5
files src/lib-storage/index/index-attribute.c
diffstat 1 files changed, 0 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-attribute.c	Tue Sep 13 03:33:06 2016 -0400
+++ b/src/lib-storage/index/index-attribute.c	Tue Sep 13 07:49:41 2016 -0400
@@ -197,13 +197,6 @@
 	time_t ts = value->last_change != 0 ? value->last_change : ioloop_time;
 	int ret = 0;
 
-	if (!t->internal_attribute &&
-	    !MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE(key)) {
-		mail_storage_set_error(t->box->storage, MAIL_ERROR_PARAMS,
-			"Internal attributes cannot be changed directly");
-		return -1;
-	}
-
 	if (index_storage_attribute_get_dict_trans(t, type, &dtrans,
 						   &mailbox_prefix) < 0)
 		return -1;
@@ -238,10 +231,6 @@
 
 	memset(value_r, 0, sizeof(*value_r));
 
-	if (!t->internal_attribute &&
-	    !MAILBOX_ATTRIBUTE_KEY_IS_USER_ACCESSIBLE(key))
-		return 0;
-
 	if (index_storage_get_dict(t->box, type, &dict, &mailbox_prefix) < 0)
 		return -1;