mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-10 09:21:23 +00:00
Respect mailbox administration rights of user
This commit is contained in:
1
NEWS
1
NEWS
@@ -16,6 +16,7 @@ Bug fixes
|
||||
- [core] always send IMIP messages using UTF-8
|
||||
- [web] fixed support for recurrent tasks
|
||||
- [web] improved validation of mail account delegators
|
||||
- [web] allow edition of a mailbox rights when user can administer mailbox
|
||||
|
||||
2.3.17 (2016-10-20)
|
||||
-------------------
|
||||
|
||||
@@ -1517,11 +1517,12 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||
path = [[self imap4Connection] imap4FolderNameForURL: [self imap4URL]];
|
||||
|
||||
if ([self _path: path
|
||||
isInNamespaces: [mailAccount otherUsersFolderNamespaces]]
|
||||
|| [self _path: path
|
||||
isInNamespaces: [mailAccount sharedFolderNamespaces]])
|
||||
isInNamespaces: [mailAccount otherUsersFolderNamespaces]] ||
|
||||
[self _path: path
|
||||
isInNamespaces: [mailAccount sharedFolderNamespaces]])
|
||||
[acls addObject: SOGoRole_ObjectViewer];
|
||||
else
|
||||
// Inside user's namespace, automatically owner
|
||||
[acls addObject: SoRole_Owner];
|
||||
|
||||
return acls;
|
||||
@@ -1534,23 +1535,22 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||
|
||||
userLogin = [[context activeUser] login];
|
||||
if ([uid isEqualToString: userLogin])
|
||||
// Login user wants her ACLs
|
||||
acls = [self _sharesACLs];
|
||||
else
|
||||
// Login user wants the ACLs of another user
|
||||
acls = [NSMutableArray array];
|
||||
|
||||
if ([owner isEqualToString: userLogin])
|
||||
{
|
||||
if (!mailboxACL)
|
||||
[self _readMailboxACL];
|
||||
if (!mailboxACL)
|
||||
[self _readMailboxACL];
|
||||
|
||||
if ([mailboxACL isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
userAcls = [mailboxACL objectForKey: uid];
|
||||
if (!([userAcls length] || [uid isEqualToString: defaultUserID]))
|
||||
userAcls = [mailboxACL objectForKey: defaultUserID];
|
||||
if ([userAcls length])
|
||||
[acls addObjectsFromArray: [self _imapAclsToSOGoAcls: userAcls]];
|
||||
}
|
||||
if ([mailboxACL isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
userAcls = [mailboxACL objectForKey: uid];
|
||||
if (!([userAcls length] || [uid isEqualToString: defaultUserID]))
|
||||
userAcls = [mailboxACL objectForKey: defaultUserID];
|
||||
if ([userAcls length])
|
||||
[acls addObjectsFromArray: [self _imapAclsToSOGoAcls: userAcls]];
|
||||
}
|
||||
|
||||
return acls;
|
||||
|
||||
Reference in New Issue
Block a user