mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-27 04:06:23 +00:00
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.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user