# HG changeset patch # User Josef 'Jeff' Sipek # Date 1473767381 14400 # Node ID 333aef265b3f2971481a6ade2d9b91c89da28176 # Parent bcfa015fe9b8a7c82289526d8245b426eb26a869 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. diff -r bcfa015fe9b8 -r 333aef265b3f src/lib-storage/index/index-attribute.c --- 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;