From b92ca092ed92f73f80c23dab08e59716beaeec8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20J=2E=20Hern=C3=A1ndez=20Blasco?= Date: Thu, 28 Jan 2016 15:50:10 +0100 Subject: [PATCH] oc: Remove specialised PidTagAccess and PidTagAccessLevel As the generic one from MAPIStoreMessage applies here since we use subscriberCan* protocol to know the values from these properties. --- OpenChange/MAPIStoreGCSMessage.m | 66 -------------------------------- 1 file changed, 66 deletions(-) diff --git a/OpenChange/MAPIStoreGCSMessage.m b/OpenChange/MAPIStoreGCSMessage.m index 84976917e..97898ae50 100644 --- a/OpenChange/MAPIStoreGCSMessage.m +++ b/OpenChange/MAPIStoreGCSMessage.m @@ -54,72 +54,6 @@ return [sogoObject lastModified]; } -- (enum mapistore_error) getPidTagAccess: (void **) data // TODO - inMemCtx: (TALLOC_CTX *) memCtx -{ - MAPIStoreContext *context; - WOContext *woContext; - SoSecurityManager *sm; - MAPIStoreUserContext *userContext; - uint32_t access; - - context = [self context]; - userContext = [self userContext]; - if ([[context activeUser] isEqual: [userContext sogoUser]]) - access = 0x03; - else - { - sm = [SoSecurityManager sharedSecurityManager]; - woContext = [userContext woContext]; - - access = 0; - if (![sm validatePermission: SoPerm_ChangeImagesAndFiles - onObject: sogoObject - inContext: woContext]) - access |= 1; - if (![sm validatePermission: SoPerm_AccessContentsInformation - onObject: sogoObject - inContext: woContext]) - access |= 2; - if (![sm validatePermission: SOGoPerm_DeleteObject - onObject: sogoObject - inContext: woContext]) - access |= 4; - } - *data = MAPILongValue (memCtx, access); - - return MAPISTORE_SUCCESS; -} - -- (enum mapistore_error) getPidTagAccessLevel: (void **) data // TODO - inMemCtx: (TALLOC_CTX *) memCtx -{ - MAPIStoreContext *context; - MAPIStoreUserContext *userContext; - WOContext *woContext; - SoSecurityManager *sm; - uint32_t accessLvl; - - context = [self context]; - userContext = [self userContext]; - if ([[context activeUser] isEqual: [userContext sogoUser]]) - accessLvl = 1; - else - { - sm = [SoSecurityManager sharedSecurityManager]; - woContext = [userContext woContext]; - if (![sm validatePermission: SoPerm_ChangeImagesAndFiles - onObject: sogoObject - inContext: woContext]) - accessLvl = 1; - else - accessLvl = 0; - } - *data = MAPILongValue (memCtx, accessLvl); - - return MAPISTORE_SUCCESS; -} - - (enum mapistore_error) getPidTagChangeKey: (void **) data inMemCtx: (TALLOC_CTX *) memCtx {